jwutil (version 1.2.3)

dput_expect_equal: dput a testthat test

Description

Generate an R expression containing a testthat expectation for the given expression and its result. This is useful when you know that a certain output is correct, and wish to generate a test case to reflect this.

Usage

dput_expect_equal(...)

Arguments

...

expressions

Value

character vector with each element containing an R expression with expect_equal test case corresponding to the evaluated input expressions.

Examples

Run this code
# NOT RUN {
dput_expect_equal("a" %nin% c("b", "c", "d"))
# }

Run the code above in your browser using DataLab