Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 50fabc3

Browse files
author
Hendrik van Antwerpen
committed
Put assertion arguments in the right order
1 parent 81986ba commit 50fabc3

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

stack-graphs/tests/it/json.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ fn can_serialize_graph() {
484484
]
485485
}
486486
);
487-
assert_eq!(actual, expected);
487+
assert_eq!(expected, actual);
488488
}
489489

490490
#[test]
@@ -1808,7 +1808,7 @@ fn can_serialize_paths() {
18081808
}
18091809
]
18101810
);
1811-
assert_eq!(actual, expected);
1811+
assert_eq!(expected, actual);
18121812
}
18131813

18141814
#[test]
@@ -2107,5 +2107,5 @@ fn can_serialize_partial_paths() {
21072107
}
21082108
]
21092109
);
2110-
assert_eq!(actual, expected);
2110+
assert_eq!(expected, actual);
21112111
}

stack-graphs/tests/it/partial.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn can_apply_offset_to_partial_symbol_stacks() {
6262
let with_offset =
6363
stack.with_offset(&mut partials, symbol_variable_offset, scope_variable_offset);
6464
let actual = with_offset.display(&graph, &mut partials).to_string();
65-
assert_eq!(actual, expected);
65+
assert_eq!(expected, actual);
6666
}
6767

6868
verify((&[], None), 0, 0, "");
@@ -128,11 +128,11 @@ fn can_unify_partial_symbol_stacks() -> Result<(), PathResolutionError> {
128128
&mut scope_bindings,
129129
)?;
130130
let unified = unified.display(&graph, &mut partials).to_string();
131-
assert_eq!(unified, expected_unification);
131+
assert_eq!(expected_unification, unified);
132132
let symbol_bindings = symbol_bindings.display(&graph, &mut partials).to_string();
133-
assert_eq!(symbol_bindings, expected_symbol_bindings);
133+
assert_eq!(expected_symbol_bindings, symbol_bindings);
134134
let scope_bindings = scope_bindings.display(&graph, &mut partials).to_string();
135-
assert_eq!(scope_bindings, expected_scope_bindings);
135+
assert_eq!(expected_scope_bindings, scope_bindings);
136136
Ok(())
137137
}
138138

@@ -339,9 +339,9 @@ fn can_unify_partial_scope_stacks() -> Result<(), PathResolutionError> {
339339
let mut bindings = PartialScopeStackBindings::new();
340340
let unified = lhs.unify(&mut partials, rhs, &mut bindings)?;
341341
let unified = unified.display(&graph, &mut partials).to_string();
342-
assert_eq!(unified, expected_unification);
342+
assert_eq!(expected_unification, unified);
343343
let bindings = bindings.display(&graph, &mut partials).to_string();
344-
assert_eq!(bindings, expected_bindings);
344+
assert_eq!(expected_bindings, bindings);
345345
Ok(())
346346
}
347347

@@ -465,7 +465,7 @@ fn can_create_partial_path_from_node() {
465465
let mut partials = PartialPaths::new();
466466
let path = PartialPath::from_node(graph, &mut partials, node);
467467
let actual = path.display(&graph, &mut partials).to_string();
468-
assert_eq!(actual, expected);
468+
assert_eq!(expected, actual);
469469
}
470470

471471
verify(
@@ -570,7 +570,7 @@ fn can_append_partial_paths() -> Result<(), PathResolutionError> {
570570
r.ensure_no_overlapping_variables(&mut ps, &l);
571571
l.concatenate(&g, &mut ps, &r)?;
572572
let actual = l.display(&g, &mut ps).to_string();
573-
assert_eq!(actual, expected);
573+
assert_eq!(expected, actual);
574574

575575
Ok(())
576576
}

0 commit comments

Comments
 (0)