exit_file {tinytest}R Documentation

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(...)

Arguments

msg

[character] An optional message to print after exiting.

...

A comma-separated list of conditions.

Value

The exit message

See Also

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

Examples

exit_file("I'm too tired to test")
exit_if_not(packageVersion("tinytest")  >= "1.0.0")
## Not run: 
exit_if_not(requireNamespace("foo",quietly=TRUE))

## End(Not run)

[Package tinytest version 1.4.1 Index]