Show syscall/builtin difference on assertion failure#4501
Open
franciszekjob wants to merge 8 commits into
Open
Show syscall/builtin difference on assertion failure#4501franciszekjob wants to merge 8 commits into
franciszekjob wants to merge 8 commits into
Conversation
Contributor
Author
|
This change is part of the following stack: Change managed by git-spice. |
This was referenced Jul 17, 2026
franciszekjob
force-pushed
the
franciszekjob/show-expected-vs-actual-builtins
branch
from
July 20, 2026 08:04
e4a9e43 to
14917c6
Compare
franciszekjob
force-pushed
the
franciszekjob/show-expected-vs-actual-builtins
branch
2 times, most recently
from
July 20, 2026 09:13
a1c8a2f to
02e186c
Compare
Mirror `assert_gas`: `assert_syscall`, `assert_builtin` and `assert_case_output_contains` now report the expected and actual value on mismatch, so failures surface the value the source should hold. The `range_check` off-by-one is normalized into the observed count so the printed `actual` equals the source expectation verbatim. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
franciszekjob
force-pushed
the
franciszekjob/show-expected-vs-actual-builtins
branch
from
July 20, 2026 09:32
6ccb1e3 to
0354d36
Compare
franciszekjob
marked this pull request as ready for review
July 20, 2026 09:57
franciszekjob
requested review from
DelevoXDG and
ddoktorski
and removed request for
a team
July 20, 2026 09:57
ddoktorski
reviewed
Jul 22, 2026
| use shared::test_utils::output_assert::assert_stdout_contains; | ||
| use std::path::Path; | ||
|
|
||
| #[test] |
Contributor
There was a problem hiding this comment.
Similar to my note on the previous PR, this file is meant for Forge resources integration tests, so we probably shouldn't mix in tests for test utilities here. We could either move them to a separate file or drop them entirely since they aren't testing tool logic.
Comment on lines
+458
to
+459
| .unwrap_or(&SyscallUsage::new(0, 0)) | ||
| .call_count; |
Contributor
There was a problem hiding this comment.
Suggested change
| .unwrap_or(&SyscallUsage::new(0, 0)) | |
| .call_count; | |
| .map_or(0, |usage| usage.call_count); |
Comment on lines
+533
to
+534
| fn format_available_test_cases(result: &[AnyTestCaseSummary]) -> String { | ||
| result |
Contributor
There was a problem hiding this comment.
nit:
Suggested change
| fn format_available_test_cases(result: &[AnyTestCaseSummary]) -> String { | |
| result | |
| fn format_available_test_cases(summaries: &[AnyTestCaseSummary]) -> String { | |
| summaries |
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.
Closes #4484
Introduced changes
Before
After
Checklist
CHANGELOG.md