mllg / checkmate

Fast and versatile argument checks
https://mllg.github.io/checkmate/
Other
263 stars 30 forks source link

Message by qassert() is not quite correct for inequalities in length rule #170

Closed hplieninger closed 4 years ago

hplieninger commented 5 years ago

The error message in the first case should read Must be of length < 3 rather than <= 3.

checkmate::qassert(1:3, "X<3")
#> Error in eval(expr, envir, enclos): Assertion on '1:3' failed. Must be of length <= 3, but has length 3.
checkmate::qassert(1:4, "X<=3")
#> Error in eval(expr, envir, enclos): Assertion on '1:4' failed. Must be of length <= 3, but has length 4.

Created on 2019-10-25 by the reprex package (v0.3.0)

mllg commented 4 years ago

Thanks for the report.