inst/tinytest/test_gh_issue_32.R

out <- ignore(expect_equal)("foo","bar")
# Message should read 'Expected "target" got "current"',
# not the other way around
expect_true(grepl("bar.+foo",attr(out,"diff")))

out <- ignore(expect_identical)("foo","bar")
expect_true(grepl("bar.+foo",attr(out,"diff")))

out <- ignore(expect_equivalent)("foo","bar")
expect_true(grepl("bar.+foo",attr(out,"diff")))

Try the tinytest package in your browser

Any scripts or data that you put into this service are public.

tinytest documentation built on March 7, 2023, 7:43 p.m.