BurStMisc (version 1.1)

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.

Value

NULL

Side effects

text is written to the console or to a file.

See Also

expect_equal.

Examples

Run this code
writeExpectTest(head(1:10))
writeExpectTest(head(cars))

Run the code above in your browser using DataCamp Workspace