Commit 361dccb
committed
Fix CIEEE754 rounding mode test isolation
The CIEEE754 integration tests were calling ieee754_set_rounding_mode()
directly via the C API but not restoring the original mode, causing test
pollution and failures in subsequent tests.
Issue:
- setRoundingModeDownward() left FPU in DOWNWARD mode
- setRoundingModeUpward() left FPU in UPWARD mode
- setRoundingModeTowardZero() left FPU in TOWARDZERO mode
- roundingModeAffectsOperations() left FPU in UPWARD mode
- roundingModeAndExceptions() left FPU in TOWARDZERO mode
- These caused ALL subsequent rounding tests to fail
Fix:
- Added defer blocks to ALL tests that change rounding mode
- Save original mode before test
- Restore in defer block (always runs, even on failure)
- Removed manual restoration calls (defer handles it)
Result:
All 707 tests now pass reliably.1 parent 59ccbdc commit 361dccb
1 file changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
| |||
44 | 53 | | |
45 | 54 | | |
46 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
47 | 59 | | |
48 | 60 | | |
49 | 61 | | |
| |||
52 | 64 | | |
53 | 65 | | |
54 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
55 | 70 | | |
56 | 71 | | |
57 | 72 | | |
| |||
66 | 81 | | |
67 | 82 | | |
68 | 83 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
| |||
341 | 353 | | |
342 | 354 | | |
343 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
344 | 359 | | |
345 | 360 | | |
346 | 361 | | |
| |||
352 | 367 | | |
353 | 368 | | |
354 | 369 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | 370 | | |
359 | 371 | | |
360 | 372 | | |
| |||
0 commit comments