tinytest icon indicating copy to clipboard operation
tinytest copied to clipboard

Improve error message of expect_false() and expect_true()

Open JamesThompsonC opened this issue 5 months ago • 1 comments

Address https://github.com/markvanderloo/tinytest/issues/138

Error when length(class(current)) > 1L

Fix uses class(current)[1] to construct the error message.

JamesThompsonC avatar Jul 02 '25 18:07 JamesThompsonC

AFAICT - This is similar to #92. For consistency it may be worth matching the style of error messaging used in the commit that fixed it. E.g. using

sprintf("object of class '<%s>'", paste(class(current), collapse=", "))

instead of

sprintf("object of class '%s'", class(current)[1])

TimTaylor avatar Jul 02 '25 19:07 TimTaylor