tests/testthat/test-are-identical.R

test_that(
  "test are_identical with identical objects returns true", 
  {
    expect_true(are_identical((1:3) ^ 3, c(1, 8, 27)))
  }
)

test_that(
  "test are_identical with non-identical objects returns false", 
  {
    expect_false(are_identical((1:3) ^ 3, c(1, 8, 27.0000001)))
  }
)

Try the assertive.base package in your browser

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

assertive.base documentation built on Feb. 8, 2021, 9:06 a.m.