fail {testthat} | 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") succeed(message = "Success has been forced")
message |
a string to display. |
## Not run: test_that("this test fails", fail()) test_that("this test succeeds", succeed()) ## End(Not run)