tests/testthat/test-throws-AlphaInvalidValues.R

test_that("throws when alpha values are invalid", {
  te <- c(2, 2)
  tt <- c(3, 3)
  ce <- c(2, 2)
  ct <- c(5, 5)
  expect_error(rema(te, tt, ce, ct, alpha = -1), alpha.err)
  expect_error(rema(te, tt, ce, ct, alpha = 1), alpha.err)
  expect_error(rema(te, tt, ce, ct, alpha = TRUE), alpha.err)
  expect_error(rema(te, tt, ce, ct, alpha = "Yo"), alpha.err)
  expect_error(rema(te, tt, ce, ct, alpha = NaN), alpha.err)
  expect_error(rema(te, tt, ce, ct, alpha = NA), alpha.err)
})

Try the rema package in your browser

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

rema documentation built on Oct. 29, 2021, 1:07 a.m.