tests/testthat/test-utils.R

test_that("test for correct errors and warnings", {
  expect_error(gev_mle_cpp(c("test")),
               "Input data must be numeric and finite.")
  expect_error(gev_mle_cpp_lvec(c("test")),
               "Input data must be numeric and finite.")
  }
)

test_that("test lTableVec", {
  xx <- rep(1:6, each = 2)
  expect_equal(length(lTableVec(xx, l = 3*2)), 2)
  expect_equal(length(lTableVec(xx, l = 4)), 3)
  expect_equal(length(lTableVec(xx, l = 5)), 3)
})

Try the maxbootR package in your browser

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

maxbootR documentation built on June 8, 2025, 10:58 a.m.