assertNamed(x, type = "named", add = NULL, .var.name)
testNamed(x, type = "named")
Arguments
x
[any]
Object to check.
type
[character(1)]
Select the check(s) to perform.
unnamed checks x to be unnamed.
named (default) checks x to be named which excludes names to be NA or emtpy ("").
add
[AssertCollection]
Collection to store assertions. See AssertCollection.
.var.name
[character(1)]
Name for x. Defaults to a heuristic to determine
the name using deparse and substitute.
Value
Depending on the function prefix:
If the check is successful, all functions return TRUE.
If the check is not successful, assertNamed throws an error message,
testNamed returns FALSE, checkNamed returns
a string with the error message. The function expect_named will
return an expectation.