Skip to content

Commit 34bc78f

Browse files
committed
Added better error message to the assert!ions in check_unique that show the NodeId and Graphs.
1 parent c35a516 commit 34bc78f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pdg/src/info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ mod test {
224224

225225
fn check_unique(pdg: &Graphs, unique: &[NodeId], non_unique: &[NodeId]) {
226226
for &unique in unique {
227-
assert!(info(pdg, unique).unique);
227+
assert!(info(pdg, unique).unique, "expected {unique} to be unique in {pdg}");
228228
}
229229
for &non_unique in non_unique {
230-
assert!(!info(pdg, non_unique).unique);
230+
assert!(!info(pdg, non_unique).unique, "expected {non_unique} to be non-unique in {pdg}");
231231
}
232232
}
233233

0 commit comments

Comments
 (0)