Skip to content

Commit 1a52eba

Browse files
hcplcramertj
authored andcommitted
Fix the select_all::smoke test
So that it matches the current behavior.
1 parent f484fff commit 1a52eba

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

futures/tests/select_all.rs

+7-4
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@ fn smoke() {
1111
ok(3),
1212
];
1313

14+
// This test depends on an implementation detail of `select_all` to match
15+
// its behavior: it uses `swap_remove` under the hood.
16+
1417
let (i, idx, v) = block_on(select_all(v)).ok().unwrap();
1518
assert_eq!(i, 1);
1619
assert_eq!(idx, 0);
1720

18-
let (i, idx, v) = block_on(select_all(v)).err().unwrap();
19-
assert_eq!(i, 2);
20-
assert_eq!(idx, 0);
21-
2221
let (i, idx, v) = block_on(select_all(v)).ok().unwrap();
2322
assert_eq!(i, 3);
2423
assert_eq!(idx, 0);
2524

25+
let (i, idx, v) = block_on(select_all(v)).err().unwrap();
26+
assert_eq!(i, 2);
27+
assert_eq!(idx, 0);
28+
2629
assert!(v.is_empty());
2730
}

0 commit comments

Comments
 (0)