tests/testthat/test-cpp-rtrunc.R

context("rtrunc.cpp unit tests")

test_that("rtrunc_repeat", {
  lower <- 5; upper <- 8
  r <- replicate(10, hesim:::C_test_rtrunc_repeat(lower, upper))
  expect_true(all(r >= lower & r <= upper))
})

Try the hesim package in your browser

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

hesim documentation built on Sept. 4, 2022, 1:06 a.m.