Skip to content

Fix flaky float comparison in aarch64 tests - #36

Open
AhmedAmrNabil wants to merge 1 commit into
LinuxDevon:masterfrom
AhmedAmrNabil:test/fix-aarch64
Open

Fix flaky float comparison in aarch64 tests#36
AhmedAmrNabil wants to merge 1 commit into
LinuxDevon:masterfrom
AhmedAmrNabil:test/fix-aarch64

Conversation

@AhmedAmrNabil

Copy link
Copy Markdown

The three CHECK(out_values.at(i) == refData.at(i)) comparisons in test_parse_message.cpp (Big Number not aligned little endian test) use exact float equality, which fails on aarch64 due to floating-point rounding differences. Switched to Catch::Approx(refData.at(i)).margin(1e-9) for tolerance-based comparison.

Fixes CI failure seen here: https://github.com/AhmedAmrNabil/nixpkgs-review-gha/actions/runs/32652224845/job/97225537584#step:6:647

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