tests/testthat/test-kernel.R

skip_if_distr_not_installed(UniformKernel)
skip_if_distr_not_installed(Epanechnikov)

test_that("kernel constructor error", {
  expect_error(Kernel$new())
})

test_that("decorators", {
  expect_equal(UniformKernel$new(decorators = "CoreStatistics")$decorators, "CoreStatistics")
})

test_that("rand", {
  expect_null(Epanechnikov$new()$rand(1))
})

Try the distr6 package in your browser

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

distr6 documentation built on March 28, 2022, 1:05 a.m.