From c625d627bd9a3b6d4d30ea02e03e119a99966dbd Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 25 Apr 2022 01:26:28 +0100 Subject: [PATCH] hidden: Add checks for un-notched to vpid::consistency_check Signed-off-by: Ian Jackson --- src/vpid.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/vpid.rs b/src/vpid.rs index cbc433a5..a1785839 100644 --- a/src/vpid.rs +++ b/src/vpid.rs @@ -405,6 +405,8 @@ pub fn consistency_check( let occ = goccults.occults.get(occid).unwrap(); if let Some(notch) = permute_notch { assert_eq!(occ.notches.table[notch], NR::Piece(piece)); + } else { + assert!(occ.unnotched.contains(&piece)); } } } @@ -438,6 +440,11 @@ pub fn consistency_check( walk = next; } assert_eq!(nfree1, nfree2); + + for &ppiece in &occ.unnotched { + assert_eq!(gpieces.get(ppiece).unwrap().occult.passive, + Some(Passive { occid, permute_notch: None })); + } } } -- 2.30.2