From 3d11ec43e530d26c7bd9425344c71fc367c81f2e Mon Sep 17 00:00:00 2001 From: Khyber Sen Date: Thu, 15 Sep 2022 23:01:06 -0700 Subject: [PATCH] Added better error message to the `assert!`ions in `check_unique` that show the `NodeId` and `Graphs`. --- pdg/src/info.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdg/src/info.rs b/pdg/src/info.rs index cfe5646de8..7fe0fd2745 100644 --- a/pdg/src/info.rs +++ b/pdg/src/info.rs @@ -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}"); } }