tests/testthat/test-RACDPAL.R

test_that("RACDPAL_fun has expected output when RAC_1 is out of range",{
  expect_equal(RACDPAL_fun(-1, 1, 1, 1), "NA(b)")
})

test_that("RACDPAL_fun has expected output when RAC_2A is out of range",{
  expect_equal(RACDPAL_fun(1, -1, 1, 1), "NA(b)")
})

test_that("RACDPAL_fun has expected output when RAC_2B is out of range",{
  expect_equal(RACDPAL_fun(1, 1, -1, 1), "NA(b)")
})

test_that("RACDPAL_fun has expected output when RAC_2C is out of range",{
  expect_equal(RACDPAL_fun(1, 1, 1, -1), "NA(b)")
})

test_that("RACDPAL_fun has expected output when all values are in range",{
  expect_equal(RACDPAL_fun(1, 1, 1, 1), 1)
})

Try the cchsflow package in your browser

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

cchsflow documentation built on May 28, 2022, 1:09 a.m.