R/expect-equality.R
expect_equivalent.RdCompares object and expected using all.equal() and
check.attributes = FALSE.
expect_equivalent( object, expected, ..., info = NULL, label = NULL, expected.label = NULL )
| object | Computation and value to compare it to. Both arguments supports limited unquoting to make it easier to generate readable failures within a function or for loop. See quasi_label for more details. |
|---|---|
| expected | Computation and value to compare it to. Both arguments supports limited unquoting to make it easier to generate readable failures within a function or for loop. See quasi_label for more details. |
| ... | Passed on to |
| info | Extra information to be included in the message. This argument is soft-deprecated and should not be used in new code. Instead see alternatives in quasi_label. |
| label | Used to customise failure messages. For expert use only. |
| expected.label | Used to customise failure messages. For expert use only. |
expect_equivalent() is deprecated in the 3rd edition. Instead use
expect_equal(ignore_attr = TRUE).
#' # expect_equivalent() ignores attributes a <- b <- 1:3 names(b) <- letters[1:3] if (FALSE) { expect_equal(a, b) } expect_equivalent(a, b)#> Warning: `expect_equivalent()` was deprecated in the 3rd edition. #> ℹ Use expect_equal(ignore_attr = TRUE)