tests/testthat/test_whereAre.R

test_that("where are", {
  a <- 12
  b <- c(10, 11, 12, 10, 11, 12)
  out <- capture_output(cont <- whereAre(a=a, b=b))
  out2 <- capture_output(cont <- whereAre(a=a, b=b, verbose = FALSE))

  expect_equal(cont, c(3, 6))
  expect_equal(out, "Found 2 elements.")
  expect_equal(out2, "")
})

Try the eatTools package in your browser

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

eatTools documentation built on Nov. 23, 2023, 5:06 p.m.