laziness, impatience, and hubris | |
PerlMonks |
Re^2: The wonders of Test::Moreby syphilis (Archbishop) |
on May 22, 2022 at 01:28 UTC ( [id://11144069]=note: print w/replies, xml ) | Need Help?? |
ok $exp eq $got or diag explain [$exp, $got]; Yeah, that's not a bad idea. I don't get much sense from "or diag explain [$exp, $got]" when the variables are Math::MPFR objects: but I could instead use something like or warn "$got == $expected" to provide a more meaningful diagnostic. There's probably quite a few places in my test scripts where this blow-up could occur, but the blow-up only happens with the overloaded "!=" operator, and then only if the test fails. Cheers, Rob
In Section
Seekers of Perl Wisdom
|
|