tests/testthat/test-GLM.R

test_that("GLM.new works", {
  expect_equal(GLM.new(distr = "normal"), NormalGLM$new())
  expect_equal(GLM.new(distr = "exp"), ExpGLM$new())
  expect_equal(GLM.new(distr = "weibull"), WeibullGLM$new())
  expect_equal(GLM.new(distr = "gamma"), GammaGLM$new())
})

test_that("GLM.new throws an error for unknown distr", {
  expect_error(GLM.new(distr = "unknown"))
})

Try the gofreg package in your browser

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

gofreg documentation built on Oct. 4, 2024, 5:10 p.m.