Skip to content

test: expand error path tests for float8#15

Merged
dndungu merged 1 commit intomainfrom
test/error-paths
Mar 30, 2026
Merged

test: expand error path tests for float8#15
dndungu merged 1 commit intomainfrom
test/error-paths

Conversation

@dndungu
Copy link
Copy Markdown
Contributor

@dndungu dndungu commented Mar 30, 2026

Summary

  • Add NaN propagation tests through all arithmetic ops (Add, Sub, Mul, Div, Min, Max), negative NaN (0xFF), math functions, comparisons, slice operations, and Abs/Sign
  • Add overflow clamping tests verifying out-of-range float32 values produce infinity (default mode) or errors (strict mode)
  • Add underflow clamping tests for tiny float32 values clamping to zero
  • Add comprehensive zero sign handling tests across all four arithmetic ops, division by zero, 0*Inf indeterminate forms, and zero equality

Test plan

  • All new tests pass with go test -race ./...
  • Pre-existing failures (TestArithmeticIdentities, TestAddBasic inf+(-inf)) are unrelated

Add comprehensive tests for NaN propagation through all arithmetic ops
(Add, Sub, Mul, Div, Min, Max) and math functions, overflow clamping of
out-of-range float32 to infinity, underflow clamping to zero, and
zero sign handling across all four arithmetic operations including
division by zero and indeterminate forms (0*Inf, Inf-Inf).
@dndungu dndungu merged commit da7e1cc into main Mar 30, 2026
@dndungu dndungu deleted the test/error-paths branch March 30, 2026 14:06
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