View source: R/expect-equality.R
expect_reference | R Documentation |
expect_reference()
compares the underlying memory addresses of
two symbols. It is for expert use only.
expect_reference(
object,
expected,
info = NULL,
label = NULL,
expected.label = NULL
)
object , 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. |
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 , expected.label |
Used to customise failure messages. For expert use only. |
expect_reference()
is deprecated in the third edition. If you know what
you're doing, and you really need this behaviour, just use is_reference()
directly: expect_true(rlang::is_reference(x, y))
.
Other expectations:
comparison-expectations
,
equality-expectations
,
expect_error()
,
expect_length()
,
expect_match()
,
expect_named()
,
expect_null()
,
expect_output()
,
expect_silent()
,
inheritance-expectations
,
logical-expectations
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.