Skip to content

Commit

Permalink
ptest: Use 1-based indices for tests
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
d3zd3z committed Apr 19, 2024
1 parent 0ceb85a commit 29d97b9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ptest/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl Matrix {
/// Print out all of the feature sets.
fn show(&self) {
for (i, feature) in self.envs.iter().enumerate() {
println!("{:3}. {}", i, feature.simple_textual());
println!("{:3}. {}", i + 1, feature.simple_textual());
}
}

Expand All @@ -276,7 +276,7 @@ impl Matrix {
.envs
.into_iter()
.enumerate()
.filter(|(ind, _)| pick.contains(ind))
.filter(|(ind, _)| pick.contains(&(ind + 1)))
.map(|(_, item)| item)
.collect();
Matrix { envs }
Expand Down

0 comments on commit 29d97b9

Please sign in to comment.