Skip to contents

When you add a new distribution, you want to add a test to make sure it is behaving as expected. This function generates a test template. See also greta_distribution_template_test() to see the text generated if you want to save it somewhere else.

Usage

write_distribution_test(dist_name, overwrite = FALSE)

Arguments

dist_name

character, name of distribution.

overwrite

logical. Default is FALSE. Whether to overwrite the test file if it already exists.

Value

test file written out to tests/testthat/test-{dist_name}.

Examples

if (FALSE) { # \dontrun{
write_distribution_test("gumbel")
} # }