tinytest (version 1.4.1)

exit_file: Stop testing (conditionally)

Description

Use exit_file to exit a file with a custom message, or use exit_if to exit if one or more conditions are met. exit_if will create a message akin to messages created by stopifnot.

Usage

exit_file(msg = "")

exit_if_not(...)

Value

The exit message

Arguments

msg

[character] An optional message to print after exiting.

...

A comma-separated list of conditions.

See Also

Other test-files: build_install_test(), run_test_dir(), run_test_file(), summary.tinytests(), test_package()

Examples

Run this code
exit_file("I'm too tired to test")
exit_if_not(packageVersion("tinytest")  >= "1.0.0")
if (FALSE) {
exit_if_not(requireNamespace("foo",quietly=TRUE))
}

Run the code above in your browser using DataLab