Repository navigation
test: five assertions print what they saw when they fail - #549
Merged
vyncint merged 3 commits intoSep 30, 2026
Merged
Conversation
Signed-off-by: Devansh Gangwar <devansh.gangwar@ad.infosys.com>
Signed-off-by: Devansh Gangwar <devansh.gangwar@ad.infosys.com>
`{:?}` of `none.stdout`, a Vec<u8>, prints a list of byte values such as
[117, 115, 97, ...] instead of the text; it now goes through
String::from_utf8_lossy like the stderr assertion right below it. The
artifact test's timeout check prints `{err}`, as vyncint#545 suggested: the
Display form is the readable one, with the screen block and any query
note, where Debug is the struct.
Signed-off-by: Vyncint Ng <115854244+vyncint@users.noreply.github.com>
vyncint
approved these changes
Sep 30, 2026
vyncint
left a comment
Owner
There was a problem hiding this comment.
Thanks again! Four of the five were right as written, and binding the result to a variable before the matches! is exactly the shape the builder_validation and compat ones needed.
I pushed one commit on top. {:?} on none.stdout prints the Vec as byte values, [117, 115, 97, ...], rather than text, so it now goes through String::from_utf8_lossy like the stderr assertion right below it. And the timeout check prints {err}, as the issue suggested: the Display form is the readable one, with the screen block. I also retitled the PR to Conventional Commit form (test: …, no space before the colon), since the title becomes the commit subject on main. Merging.
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.
What & why
Impoves the assertion failure message in five tests so that test failures provide clearer context and are easier to diagnose.
Closes #545
Checklist
cargo fmt --allandcargo clippy --workspace --all-targets --all-featuresare cleangit commit -s) — see CONTRIBUTING.md §5CHANGELOG.mdupdated under[Unreleased](user-facing changes only)cargo insta review, not blind-accepted