Closed decathorpe closed 4 months ago
Ok. Those tests are purposefully testing the boundaries, and there’s a case from i64 to usize at line 172
That line wasn't hard to fix (just needed early return), but I end up with an unexpectedly cased 'e':
assertion `left == right` failed
left: "1E+9223372036854775807"
right: "1e+9223372036854775807"
So I'll have to track that down.
Also the "add with overflow" errors seem to be coming from another 64-bit assumption, as we're trying to add 4294967294 zeros to the front of a number. I assume there's a saturating add somewhere.
v0.4.5 has been pushed. It should fix the tests. Please let me know here one way or another.
Can confirm that tests pass with v0.4.5. Thank you!
I tried upgrading the Fedora Linux package for the bigdecimal crate to the latest version, but hit test failures on i686-unknown-linux-gnu.
It is relatively easy to reproduce this on a x86_64 Linux machine:
rustup target add i686-unknow-linux-gnu
cargo test --target i686-unknow-linux-gnu
Running a git bisect between v0.4.3 ("good") and v0.4.4 ("bad") points to this commit as the cause of the regression: https://github.com/akubera/bigdecimal-rs/commit/ded7f6c7e150589f18d7b70b1e1641892805cbb3