From 5d79ae19c962ec6fb9cf213ea73502036b1ea8c6 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Mon, 19 Jul 2021 02:35:05 +0100 Subject: [PATCH] jst-lower: Restore longer non-z-clash tests Signed-off-by: Ian Jackson --- jstest/jst-lower.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/jstest/jst-lower.rs b/jstest/jst-lower.rs index cfdcc802..fb80a186 100644 --- a/jstest/jst-lower.rs +++ b/jstest/jst-lower.rs @@ -371,7 +371,7 @@ impl TestsAccumulator { } #[throws(Explode)] - pub fn add_exhaustive(&mut self, n: usize) { + pub fn add_exhaustive(&mut self, zclashes: bool, n: usize) { let ids: Vec = (0..n).map( |i| format!("{}.{}", i+1, 1).try_into().unwrap() ).collect_vec(); @@ -380,6 +380,7 @@ impl TestsAccumulator { iproduct!( [false,true].iter().cloned(), [ZUS::Auto, ZUS::GOnly].iter().cloned() + .take(if zclashes { 2 } else { 1}) ).map( move |(bottom,zupd)| { StartPieceSpec { id, @@ -399,7 +400,9 @@ impl TestsAccumulator { target_configs ).enumerate() { if targets.is_empty() { continue } - let name = format!("exhaustive-{:02x}", ti); + let name = format!("exhaustive-{}-{:02x}", + if zclashes { "z" } else { "g" }, + ti); self.add_test(&name, pieces, targets)?; } } @@ -473,7 +476,8 @@ fn main() { "77.11", ])?; - ta.add_exhaustive(4)?; + ta.add_exhaustive(false, 5)?; + ta.add_exhaustive(true , 4)?; let tests = ta.finalise()?; -- 2.30.2