tests/testthat/test-rgood.R

test_that("negative n", {
  expect_warning(rgood ( n = -100 , z = 0.5 , s = -3 ))
})
#> Test passed

test_that("negative th", {
  expect_warning(rgood ( n = 1 , z = 0.5 , s = -3 , th = -9 ))
})
#> Test passed

test_that("z outside (0, 1)", {
expect_warning(rgood ( n = 2 , z = c( -0.5, 0.5 ) , s = -3 ))
})
#> Test passed

test_that("vector", {
expect_vector(rgood ( n = 100 , z = 0.5 , s = -3 ), size = 100)
})
#> Test passed

Try the good package in your browser

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

good documentation built on May 29, 2024, 11:50 a.m.