ptest: Use 1-based indices for tests

Adjust the printed numbers, as well as the values to `--test` so that the tests
are numbered starting from 1 instead of zero.

Signed-off-by: David Brown <david.brown@linaro.org>
This commit is contained in:
David Brown 2024-04-11 10:13:10 -06:00 committed by David Brown
parent 0ceb85ad58
commit 29d97b94a8
1 changed files with 2 additions and 2 deletions

View File

@ -264,7 +264,7 @@ impl Matrix {
/// Print out all of the feature sets. /// Print out all of the feature sets.
fn show(&self) { fn show(&self) {
for (i, feature) in self.envs.iter().enumerate() { for (i, feature) in self.envs.iter().enumerate() {
println!("{:3}. {}", i, feature.simple_textual()); println!("{:3}. {}", i + 1, feature.simple_textual());
} }
} }
@ -276,7 +276,7 @@ impl Matrix {
.envs .envs
.into_iter() .into_iter()
.enumerate() .enumerate()
.filter(|(ind, _)| pick.contains(ind)) .filter(|(ind, _)| pick.contains(&(ind + 1)))
.map(|(_, item)| item) .map(|(_, item)| item)
.collect(); .collect();
Matrix { envs } Matrix { envs }