not {testthat} | R Documentation |
This negates an expectation, making it possible to express that you want the opposite of a standard expectation. This function is soft-deprecated and will be removed in a future version.
not(f)
f |
an existing expectation function |
x <- 1 expect_that(x, equals(1)) expect_that(x, not(equals(2))) ## Not run: expect_that(x, equals(2)) expect_that(x, not(equals(1))) ## End(Not run)