tests/testthat/test_glg.R

context("Length of the list that is returned by the glg() function.")

test_that("test if glg() returns a list of length 28", {
    expect_length(glg(y1 ~ x1 + x2, data = example_sglg), 28)
})

context("Messages are returned by the glg() function.")

test_that("test if glg() returns warning messages.", {
    expect_error(glg(data = example_sglg), "The formula argument is missing.")
    expect_error(glg(y1 ~ x1 + x2), "The data argument is missing.")
})

Try the sglg package in your browser

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

sglg documentation built on Sept. 4, 2022, 9:05 a.m.