tests/testthat/test_one_parameter_estimators.R

context("Test estimators for univariate parameters")
test_that("rob_estimate_poisson returns a non negative real number", {
  x <- rpois(100,1)
  estimate <- rob_estimate_poisson(x)
  expect_is(estimate, "numeric")
  expect_equal(estimate>=0,TRUE)
  })
mvaldora/robustr documentation built on Nov. 4, 2019, 8:33 p.m.