test(contracts): improve DisputeMonitorHelper test coverage#18732
Merged
test(contracts): improve DisputeMonitorHelper test coverage#18732
Conversation
- Add edge case test for toRpcHexString(0) - Add fuzz test for toRpcHexString prefix validation - Convert search_olderThanEverything to fuzz test - Convert search_newerThanEverything to fuzz test - Convert getUnresolvedGames_betweenTimestamps to fuzz test
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #18732 +/- ##
===========================================
+ Coverage 73.97% 77.60% +3.63%
===========================================
Files 190 135 -55
Lines 11322 7291 -4031
===========================================
- Hits 8375 5658 -2717
+ Misses 2801 1633 -1168
+ Partials 146 0 -146
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
smartcontracts
approved these changes
Jan 14, 2026
alcueca
approved these changes
Jan 15, 2026
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.
test(contracts): improve DisputeMonitorHelper test coverage
Summary
Enhances the
DisputeMonitorHelpertest suite by converting focused tests to fuzz tests and adding edge case coverage:0x0) and fuzz test verifying output prefix formattest_search_olderThanEverything_succeedsandtest_search_newerThanEverything_succeedsto proper fuzz tests with bounded timestamp parameterstest_getUnresolvedGames_betweenTimestamps_succeedsto fuzz test with parameterized timestamps and gapThe original tests used
vm.randomUint()internally but weren't parameterized fuzz tests. Converting them to proper fuzz tests withbound()constraints provides broader coverage across the input space.Review & Testing Checklist for Human
type(uint64).max - 1for newer search to allow +1 without overflow)just test-dev --match-path test/periphery/monitoring/DisputeMonitorHelper.t.sol -vto confirm all 16 tests passNotes