tests/testthat/test-unique.R

context("check-unique")

test_that("check_unique errors", {
  expect_identical(check_unique(1), 1)
  expect_identical(check_unique(1:2), 1:2)
  expect_identical(check_unique(character(0)), character(0))
  expect_error(check_unique(c(1,1)), "c[(]1, 1[)] must be unique")
})

Try the checkr package in your browser

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

checkr documentation built on May 1, 2019, 6:59 p.m.