ttdo_boolean_and_message_tests | R Documentation |
Building on the tinytest functions for testing boolean values with additional test feedback through attributes.
expect_true_xl(current, info = NA_character_, ...) expect_false_xl(current, info = NA_character_, ...) expect_null_xl(current, info = NA_character_, ...) expect_silent_xl(current, quiet = TRUE, info = NA_character_, ...) expect_error_xl( current, pattern = ".*", class = "error", info = NA_character_, ... ) expect_warning_xl( current, pattern = ".*", class = "warning", info = NA_character_, strict = FALSE, ... ) expect_message_xl( current, pattern = ".*", class = "message", info = NA_character_, strict = FALSE, ... )
current |
|
info |
scalar. Optional user-defined message. Must be a single character string. Multiline comments may be separated by "\n". |
... |
Passed to |
quiet |
|
pattern |
|
class |
|
strict |
|
While tinytest does now support the passing of additional information with the info
field in its tests, they are not yet supported in the as.data.frame.tinytests
method.
A tinytest
object. A tinytest object is a
logical
with attributes holding information about the
test that was run
library(tinytest) using(ttdo) expect_true_xl(TRUE, score = 3) # TRUE expect_true_xl(FALSE, name = "check 1-1==2", score = 1, totalpts = 2) # FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.