mirror of
https://github.com/storytold/wgpu.git
synced 2026-11-22 23:41:01 +01:00
wgsl-errors: Reverse "old" and "new" sides of diff output. (#4577)
When an error snapshot test fails and we generate a diff comparing the expected output with the actual output, treat the expected output as the diff "from", and the actual output as the diff "to" - not the reverse.
This commit is contained in:
1 parent
9fd13dcce3
commit
61bca7e0aa
1 file changed
+1
-1
@@ -8,7 +8,7 @@ fn check(input: &str, snapshot: &str) {
|
||||
.expect_err("expected parser error")
|
||||
.emit_to_string(input);
|
||||
if output != snapshot {
|
||||
for diff in diff::lines(&output, snapshot) {
|
||||
for diff in diff::lines(snapshot, &output) {
|
||||
match diff {
|
||||
diff::Result::Left(l) => println!("-{l}"),
|
||||
diff::Result::Both(l, _) => println!(" {l}"),
|
||||
|
||||
Reference in new issue
Block a user