Skip to content

Commit 8622626

Browse files
committed
Remove useless test (same as correct_grouping_map_by_collect_modulo_key)
1 parent 4d7a2d0 commit 8622626

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

tests/quick.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,19 +1200,6 @@ quickcheck! {
12001200
assert_eq!(lookup_grouping_map, lookup_grouping_map_by);
12011201
}
12021202

1203-
fn correct_grouping_map_by_modulo_key(a: Vec<u8>, modulo: u8) -> () {
1204-
let modulo = if modulo == 0 { 1 } else { modulo }; // Avoid `% 0`
1205-
let count = a.len();
1206-
let lookup = a.into_iter().into_grouping_map_by(|i| i % modulo).collect::<Vec<_>>();
1207-
1208-
assert_eq!(lookup.len(), (0..modulo).filter(|i| lookup.contains_key(i)).count());
1209-
assert_eq!(lookup.values().flat_map(|vals| vals.iter()).count(), count);
1210-
1211-
for (&key, vals) in lookup.iter() {
1212-
assert!(vals.iter().all(|&val| val % modulo == key));
1213-
}
1214-
}
1215-
12161203
fn correct_grouping_map_by_aggregate_modulo_key(a: Vec<u8>, modulo: u8) -> () {
12171204
let modulo = if modulo < 2 { 2 } else { modulo } as u64; // Avoid `% 0`
12181205
let lookup = a.iter()

0 commit comments

Comments
 (0)