Require usage of expect_gt(x, y) over expect_true(x > y) (and similar)
Source:R/expect_comparison_linter.R
expect_comparison_linter.Rd
testthat::expect_gt()
, testthat::expect_gte()
, testthat::expect_lt()
,
testthat::expect_lte()
, and testthat::expect_equal()
exist specifically
for testing comparisons between two objects. testthat::expect_true()
can
also be used for such tests, but it is better to use the tailored function
instead.
See also
linters for a complete list of linters available in lintr.