dput_expect_equal {jwutil}R Documentation

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

dput_expect_equal("a" %nin% c("b", "c", "d"))

[Package jwutil version 1.2.3 Index]