Learn R Programming

tinytest (version 0.9.4)

ignore: Ignore the output of an expectation

Description

Ignored expectations are not reported in the test results. Ignoring is only useful for test files, and not for use directly at the commandline. See also the vignette.

Usage

ignore(fun)

Arguments

fun

An expect_ function

Value

an ignored function

See Also

Other test-functions: expect_equal

Examples

Run this code
# NOT RUN {
   ## The result of 'expect_warning' is not stored in the test result when
   ## this is run from a file.
   expect_true( ignore(expect_warning)(warning("foo!")) )
   ## Note the placement of the brackets in ignore(expect_warning)(...).
 
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab