harness tests: the selection test's list of workloads does not shadow the function it calls
The test named its list of workloads after workloads(), which its last loop calls: the test target did not compile (clippy, m3-max-45303). Verified by the check that follows.
This commit is contained in:
1 parent
de2ce035e9
commit
f53edc0d55
1 file changed
+3
-3
@@ -648,19 +648,19 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn skip_leaves_out_what_only_would_run_and_the_creation_rows_split_apart() {
|
||||
let workloads: Vec<String> = (authored::WORKLOADS.iter())
|
||||
let every: Vec<String> = (authored::WORKLOADS.iter())
|
||||
.map(|workload| workload.name.to_owned())
|
||||
.collect();
|
||||
let creates: Vec<&str> = authored::CREATES.iter().map(|create| create.name).collect();
|
||||
assert_eq!(
|
||||
selected(&["--runtime", "new", "--skip", "create_*"]),
|
||||
(workloads.clone(), Vec::new())
|
||||
(every.clone(), Vec::new())
|
||||
);
|
||||
assert_eq!(
|
||||
selected(&["--runtime", "new", "--only", "create_*"]),
|
||||
(Vec::new(), creates.clone())
|
||||
);
|
||||
assert_eq!(selected(&["--runtime", "new"]), (workloads, creates));
|
||||
assert_eq!(selected(&["--runtime", "new"]), (every, creates));
|
||||
let first = authored::WORKLOADS[0].name;
|
||||
assert_eq!(
|
||||
selected(&["--runtime", "new", "--only", first, "--skip", first]),
|
||||
|
||||
Reference in new issue
Block a user