File: test_btwn.R

package info (click to toggle)
r-cran-bbmisc 1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 1,156 kB
  • ctags: 13
  • sloc: ansic: 152; sh: 9; makefile: 3
file content (10 lines) | stat: -rw-r--r-- 238 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
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)
})