Skip to content

Add approx large-integer overflow/boundary test coverage#467

Open
mag123c wants to merge 1 commit into
simd-lite:mainfrom
mag123c:approx-int-overflow-coverage
Open

Add approx large-integer overflow/boundary test coverage#467
mag123c wants to merge 1 commit into
simd-lite:mainfrom
mag123c:approx-int-overflow-coverage

Conversation

@mag123c

@mag123c mag123c commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Continues the #89 error-coverage work after #465 and #466.

What

  • Add a long_int_boundaries test for the approx-number-parsing parser, mirroring the correct-parser test.
    • Covers the cold parse_large_integer path: i64::MIN / u64::MAX success boundaries and the Overflow errors just past them.
  • Gate the overflow assertions to the case where neither 128bit nor big-int-as-float is enabled, since both change the outcome.

Notes

  • Test-only change: parse_large_integer already returned these errors, the path just had no test entering it.
  • approx.rs ignores big-int-as-float, but the gate mirrors the correct-parser test for consistency.
  • Verified with cargo test --features approx-number-parsing and --features approx-number-parsing,128bit.

Mirrors the correct-parser long_int_boundaries coverage for the
approx-number-parsing feature: exercises the cold parse_large_integer
path at its i64::MIN / u64::MAX success boundaries and the Overflow
errors just past them. The overflow assertions are gated to the case
where neither 128bit (wider target) nor big-int-as-float (float
reinterpretation) is enabled. Addresses simd-lite#89.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant