tests/testthat/test_symdiff.R

context("symdiff")

test_that("symdiff", {
  expect_equal(symdiff(c(1, 2), 1), 2)
  expect_equal(symdiff(c(1, 2), numeric(0)), c(1, 2))
  expect_equal(symdiff("a", "b"), c("a", "b"))
  expect_equal(symdiff("a", "a"), character(0))
})

Try the BBmisc package in your browser

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

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.