tests/testthat/test_btwn.R

context("btwn")

test_that("btwn", {
  y = c(-1L,5L,Inf)
  expect_equal(1L:3L %btwn% y, c(TRUE, TRUE, TRUE))
  expect_equal(-2L:-1L %btwn% y, c(FALSE,TRUE))
  y = 5L
  expect_equal(5L %btwn% y, TRUE)
  expect_equal(1L %btwn% y, FALSE)
})

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.