Skip to content

Conversation

@cruessler
Copy link
Contributor

This PR improves the test reporting for the diff slider test.

In addition to the first non-matching diff, the test now also reports the fixture it came from and the number of total as well as non-matching diffs. This makes the slider test more suitable as a benchmark for comparing different slider heuristics.

This is a follow-up to #2197.

Comparison of new test report (above) vs. old test report (below):

Screenshot 2025-12-01 at 10 15 00

@cruessler cruessler changed the title Report number of non-matching diffs Report number of non-matching diffs in slider test Dec 1, 2025
In addition to the first non-matching diff, the test now also reports
the fixture it came from and the number of total as well as non-matching
diffs. This makes the slider test more suitable as a benchmark for
comparing different slider heuristics.
@cruessler cruessler force-pushed the run-tests-in-parallel branch from 9747a5e to 614d93d Compare December 1, 2025 12:19
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, this is also what I had in mind when thinking about making the test more suitable. And it can always be extended from here, learning everything it needs to.

I have a few comments, but am happy to merge if this is exactly what you want.

Comment on lines 98 to 99
assert!(
matching_diffs == total_diffs,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not be more readable with assert_eq!?


assert!(
matching_diffs == total_diffs,
"assertion failed: total diffs {} == matching diffs {}\n\n{}",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the assertion failure will come across by merit of assert_eq, so the text can skip assertion failed:.

@cruessler
Copy link
Contributor Author

Thanks for the suggestions, they make a lot of sense! I also added the ratio of matching diffs as a percentage, to make the comparison between two sets of diffs even easier in case they contain a different number of diffs.

@Byron
Copy link
Member

Byron commented Dec 2, 2025

Wonderful 🙏!

@Byron Byron merged commit de2c6fc into GitoxideLabs:main Dec 2, 2025
28 checks passed
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.

2 participants