tests/testthat/test-cubicbs.R

context("Check inputs of cubicbs routine")

# Check that lower < upper

test_that("lower bound is smaller than upper bound", {
  expect_error(
    cubicbs(x=runif(20,0,1), lower=5, upper=2, K=20)
  )
})

# Check error when K<=3

test_that("K not large enough", {
  expect_error(
    cubicbs(x=runif(20,0,1), lower=0, upper=2, K=3)
  )
})

Try the blapsr package in your browser

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

blapsr documentation built on Aug. 20, 2022, 5:05 p.m.