fail | R Documentation |
These allow you to manually trigger success or failure. Failure is particularly useful to a pre-condition or mark a test as not yet implemented.
fail(
message = "Failure has been forced",
info = NULL,
trace_env = caller_env()
)
succeed(message = "Success has been forced", info = NULL)
message |
a string to display. |
info |
Character vector continuing additional information. Included for backward compatibility only and new expectations should not use it. |
trace_env |
If |
## Not run:
test_that("this test fails", fail())
test_that("this test succeeds", succeed())
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.