Learn R Programming

testextra (version 0.1.0.1)

expect_valid: Expect an S4 object is valid

Description

Similar to is_valid() except designed to work in the testthat::test_that() framework.

Usage

expect_valid(object, complete = FALSE, info = NULL, label = NULL)

Arguments

object

an S4 object to test for validity

complete

logical; if TRUE, validObject is called recursively for each of the slots. The default is FALSE.

info

extra information to be included in the message (useful when writing tests in loops).

label

object label. When NULL, computed from deparsed object.

See Also

Other validity-tests: validity-tests