|
sprintf("%s is %s %s. Difference: %.3g", act$lab, msg, exp$lab, act$val - exp$val), |
Motivation: imbs-hl/ranger#747
I know {waldo} has recently improved "what's the right number of digits to show when compare() fails", so presumably we could re-use that logic here, e.g. compare(act - exp, 0). The specifics may need to be more careful, but I think it's clearly not helpful to have expect_gt() fail with message "Difference: 0".