checkChoice(x, choices)
check_choice(x, choices)
assertChoice(x, choices, .var.name = vname(x), add = NULL)
assert_choice(x, choices, .var.name = vname(x), add = NULL)
testChoice(x, choices)
test_choice(x, choices)
expect_choice(x, choices, info = NULL, label = vname(x))
atomic
]
Set of possible values.character(1)
]
Name of the checked object to print in assertions. Defaults to
the heuristic implemented in vname
.AssertCollection
]
Collection to store assertion messages. See AssertCollection
.expect_that
.character(1)
]
Name of the checked object to print in messages. Defaults to
the heuristic implemented in vname
.TRUE
. If the check
is not successful, assertChoice
/assert_choice
throws an error message, testChoice
/test_choice
returns FALSE
,
and checkChoice
returns a string with the error message.
The function expect_choice
always returns an
expectation
.
checkSetEqual
,
checkSubset