Skip to content

Commit 59ccbdc

Browse files
committed
Fix test isolation for FPU rounding mode changes
The RoundingControl tests were changing the hardware FPU rounding mode but not reliably restoring it, causing other tests to fail when run in certain orders or in parallel. Issue: - `setRoundingMode()` and `withModeScoping()` tests set FPU mode - If tests run in parallel or in specific order, mode stays changed - All floating-point operations use the wrong rounding mode - Causes cascading failures in rounding, conversion, and scaling tests Fix: - Added `defer` blocks to save/restore original rounding mode - Ensures mode is reset even if test fails or throws - Uses try? to handle any errors during restoration This fixes all the Xcode test failures related to: - Rounding tests expecting wrong results - Float overflow behaving incorrectly - Conversion tests failing on ties-to-even rounding Also increased performance threshold for `deserialize 100 Floats repeatedly` from 5ms to 6ms to account for Xcode test runner overhead.
1 parent 919ee6b commit 59ccbdc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+15
-4
lines changed
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)