Similar to is_valid() except designed to work in the
testthat::test_that() framework.
expect_valid(object, complete = FALSE, info = NULL, label = NULL)an S4 object to test for validity
logical; if TRUE, validObject is
called recursively for each of the slots. The default is FALSE.
extra information to be included in the message (useful when writing tests in loops).
object label. When NULL, computed from deparsed object.
Other validity-tests: validity-tests