You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
both of these assertions fail - 1.0E-3 is considered equal to 0.0001 (off by one zero) and 1.0E-4 really is 0.0001 but the assertion doesn't think so.
Digging in to this there are two separate issues:
the lenient option is using a regex to trim irrelevant trailing zeroes after the decimal point, but doesn't use a $ (end of input) sigil so all the intervening (significant) zeroes are stripped
the comparison of scientific notation numbers does not deal with the scenario where one of expected or actual is denoted with exponential numbers and the other is not, but parsing as Double does not turn it back to regular notation.
I have a fix, so will raise that as a PR shortly, but raising the issue in case my PR is not accepted and someone else wants to take a crack.
The text was updated successfully, but these errors were encountered:
zakhenry
pushed a commit
to zakhenry/kotest
that referenced
this issue
Jan 22, 2022
Which version of Kotest are you using
master
This is best explained with a failing test so here goes:
both of these assertions fail -
1.0E-3
is considered equal to0.0001
(off by one zero) and1.0E-4
really is0.0001
but the assertion doesn't think so.Digging in to this there are two separate issues:
$
(end of input) sigil so all the intervening (significant) zeroes are strippedI have a fix, so will raise that as a PR shortly, but raising the issue in case my PR is not accepted and someone else wants to take a crack.
The text was updated successfully, but these errors were encountered: