Skip to content

Commit

Permalink
Added better error message to the assert!ions in check_unique tha…
Browse files Browse the repository at this point in the history
…t show the `NodeId` and `Graphs`.
  • Loading branch information
kkysen committed Sep 16, 2022
1 parent c35a516 commit 34bc78f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pdg/src/info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,10 +224,10 @@ mod test {

fn check_unique(pdg: &Graphs, unique: &[NodeId], non_unique: &[NodeId]) {
for &unique in unique {
assert!(info(pdg, unique).unique);
assert!(info(pdg, unique).unique, "expected {unique} to be unique in {pdg}");
}
for &non_unique in non_unique {
assert!(!info(pdg, non_unique).unique);
assert!(!info(pdg, non_unique).unique, "expected {non_unique} to be non-unique in {pdg}");
}
}

Expand Down

0 comments on commit 34bc78f

Please sign in to comment.