writeExpectTest:
Text for a testthat test
Description
Automatically writes the text of a testthat::expect_equal
test of an expression.
Usage
writeExpectTest(expr, filename = "", ...)
Arguments
expr
an expression to be tested.
filename
where should the results go to?
The empty string means that it goes to the console.
...
additional arguments to cat
may be given to control the output.
The most likely choice is append
.
Side effects
text is written to the console or to a file.Examples
Run this codewriteExpectTest(head(1:10))
writeExpectTest(head(cars))
Run the code above in your browser using DataLab