Learn R Programming

lintr (version 3.0.2)

expect_s4_class_linter: Require usage of expect_s4_class(x, k) over expect_true(is(x, k))

Description

testthat::expect_s4_class() exists specifically for testing the class of S4 objects. testthat::expect_true() can also be used for such tests, but it is better to use the tailored function instead.

Usage

expect_s4_class_linter()

Arguments

Tags

best_practices, package_development

See Also

linters for a complete list of linters available in lintr.