Skip to content

Commit db2ccea

Browse files
committed
Add brutal EdgeCases and Stress test suites
EdgeCases Tests (35+ tests): - Subnormal number handling (smallest values, normal/subnormal boundaries) - Sign bit edge cases (±0, sign preservation, infinity signs) - ULP (Unit in Last Place) edge cases (adjacent representable numbers) - Extreme values (maximum finite, one ULP below infinity) - NaN bit patterns (quiet/signaling NaN, different payloads) - Endianness edge cases with special values - Bit pattern validation (all zeros, sign bit only, max exponent) Stress Tests (22+ tests): - Volume tests (10,000 random conversions for Double/Float) - Rapid conversion tests (1,000 back-and-forth round-trips) - Concurrent access consistency (async serialization/deserialization) - Magnitude range sweeps (1e-308 to 1e308 for Double) - Bit pattern exhaustion (all 256 byte values in each position) - Deterministic behavior validation - Memory efficiency tests (no leaks with 10K iterations) All 137 tests in 44 suites passing (0 swiftlint violations). These tests catch bugs that commonly break other IEEE 754 implementations: - Incorrect subnormal number handling - Sign bit corruption on special values - Endianness bugs with edge cases - Non-deterministic serialization - Memory leaks under load
1 parent 85feb63 commit db2ccea

File tree

2 files changed

+917
-0
lines changed

2 files changed

+917
-0
lines changed

0 commit comments

Comments
 (0)