Fixes #332 - Epsilon value is left relaxed by a number of tests in suites - #337
Merged
DiasFranciscoA merged 4 commits intoAug 14, 2026
Merged
Conversation
For all the info, see #334 (comment)
Tests are free to relax the float epsilon to account for the differing defaults in YYC and VM, but nothing ever put it back. A relaxed value therefore leaked into every subsequent test in the run, where an overly generous tolerance could mask a genuine failure. Add Test.resetGlobalState(), which restores the epsilon to the test_default_epsilon baseline, and call it as the first step of preRunFunc in both Test and TestAsync. Between them those two cover every test type: Fact and Theory arrive via TestAsync, TestSuite and TestFrameworkRun via TestBatch. Resetting at the start rather than the end means a test that bails or expires cannot skip the reset. Running before callStartHook() leaves the existing (and until now unused) startHook free to override the baseline where a suite genuinely needs to. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
With the framework now guaranteeing a known epsilon at the start of every test, the 260 facts that opened with a defensive math_set_epsilon(0.00001) no longer need to. Removes those calls, the blank line that followed each, and the 65 surviving copies of the "Set an explicit epsilon" comment explaining them. Deletions only. The 32 facts that deliberately relax the epsilon for their own float tolerance are untouched, since they can no longer leak it into anything else. Fact count (626) and assert count (703) are unchanged. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
DiasFranciscoA
approved these changes
Aug 14, 2026
DiasFranciscoA
deleted the
332-basicmathtestsuite-epsilon-value-is-left-relaxed
branch
August 14, 2026 15:50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For the info, see #332 (comment)