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
/.dub/packages/fluent-asserts-1.0.0/fluent-asserts/source/fluentasserts/core/base.d(506): 1.0032e+06 should equal 1003200. 1.0032e+06 is not equal to 1003200.
Diff:
1[+.]0032[+e+]0[-0][+6]
Expected:1003200
Actual:1.0032e+06
need to change it to:
Assert.equal(1003200.0, 1003200.0);
to make it pass in v1.0.0.
I'm wondering in such case, should the int 1003200 be cast to double (in the fluent-asserts library) can then compare?
The text was updated successfully, but these errors were encountered:
Same problem with (int, bool) literal pair, different behavior from v0.13.3:
Assert.equal(0, false);
/.dub/packages/fluent-asserts-1.0.0/fluent-asserts/source/fluentasserts/core/base.d(506): 0 should equal false. 0 is not equal to false.
Diff:
[-false][+0]
Expected:false
Actual:0
can fluentasserts promote the bool to int internally? (and always promote the smaller type to the bigger type)?
Find another related one, and is more serious: this assert failed in v1.0.0, but works fine in v0.13.3.
double dn = 43.5001 / 4.35;
Assert.greaterThan(dn, 10.0); // 10.00002298850574712643
/.dub/packages/fluent-asserts-1.0.0/fluent-asserts/source/fluentasserts/core/base.d(506): 10 should be greater than 10. 10 is less than or equal to 10.
Expected:greater than 10
Actual:10
Why in this case, the double should not be promoted to int, but somehow promoted (from the message, it's comparing the ints instead of doubles?)
This assert used works in v0.13.3:
but in v1.0.0:
need to change it to:
to make it pass in v1.0.0.
I'm wondering in such case, should the int 1003200 be cast to double (in the fluent-asserts library) can then compare?
The text was updated successfully, but these errors were encountered: