powered by
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)succeed(message = "Success has been forced", info = NULL)
succeed(message = "Success has been forced", info = NULL)
a string to display.
Character vector continuing additional information. Included for backward compatibility only and new expectations should not use it.
# NOT RUN { test_that("this test fails", fail()) test_that("this test succeeds", succeed()) # }
Run the code above in your browser using DataLab