Skip to content

test: honor stricter unit golden tolerances - #31

Open
Streetblock wants to merge 1 commit into
GOODBOY008:mainfrom
Streetblock:feat/fix-unit-golden-tolerance
Open

test: honor stricter unit golden tolerances#31
Streetblock wants to merge 1 commit into
GOODBOY008:mainfrom
Streetblock:feat/fix-unit-golden-tolerance

Conversation

@Streetblock

Copy link
Copy Markdown
Contributor

Problem

Unit fixtures currently replace every requested tolerance with UNIT_TOLERANCE (8%). A test that explicitly requests 1% can therefore drift up to 8% while still passing. The failure message also reports the requested value instead of the effective one.

This was identified while reviewing the Code 128 mode-D FNC1 regression test.

Fix

  • use min(requested, UNIT_TOLERANCE) for unit fixtures
  • preserve the 8% default cap for callers requesting a looser tolerance
  • honor explicitly stricter limits such as 1%
  • report the actual effective tolerance on failure
  • add a regression test for unit and non-unit selection

Verification

  • cargo fmt --check
  • cargo test --test e2e_golden -- --nocapture
  • 104/104 tests pass on the standalone branch

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