Skip to content

Commit f0296d7

Browse files
authored
Remove huge list tests (#542)
Removed tests involving huge lists to reduce test time [no important files changed]
1 parent e9f1f24 commit f0296d7

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

exercises/practice/list-ops/test.ml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,22 @@ let tests = [
1515
aei 0 (L.length []);
1616
"length of normal list">::
1717
aei 4 (L.length [1;3;5;7]);
18-
"length of huge list">::
19-
aei 1_000_000 (L.length (List.range 0 1_000_000));
2018
"reverse of empty list">::
2119
ael [] (L.reverse []);
2220
"reverse of normal list">::
2321
ael [7;5;3;1] (L.reverse [1;3;5;7]);
24-
"reverse of huge list">::
25-
ael (List.range ~start:`exclusive ~stop:`inclusive ~stride:(-1) 1_000_000 0)
26-
(L.reverse (List.range 0 1_000_000));
2722
"map of empty list">::
2823
ael [] (L.map ~f:((+) 1) []);
2924
"map of normal list">::
3025
ael [2;4;6;8] (L.map ~f:((+) 1) [1;3;5;7]);
31-
"map of huge list">::
32-
ael (List.range 1 1_000_001) (L.map ~f:((+) 1) (List.range 0 1_000_000));
3326
"filter of empty list">::
3427
ael [] (L.filter ~f:is_odd []);
3528
"filter of normal list">::
3629
ael [1;3] (L.filter ~f:is_odd [1;2;3;4]);
37-
"filter of huge list">::
38-
ael (List.range ~stride:2 1 1_000_000)
39-
(L.filter ~f:is_odd (List.range 0 1_000_000));
4030
"fold of empty list">::
4131
aei 0 (L.fold ~init:0 ~f:(+) []);
4232
"fold of normal list">::
4333
aei 7 (L.fold ~init:(-3) ~f:(+) [1;2;3;4]);
44-
"fold of huge list">::
45-
aei (List.fold ~init:0 ~f:(+) (List.range 0 1_000_000))
46-
(L.fold ~init:0 ~f:(+) (List.range 0 1_000_000));
4734
"append of empty lists">::
4835
ael [] (L.append [] []);
4936
"append of empty and non-empty list">::
@@ -52,21 +39,10 @@ let tests = [
5239
ael [1;2;3;4] (L.append [1;2;3;4] []);
5340
"append of non-empty lists">::
5441
ael [1;2;3;4;5] (L.append [1;2;3] [4;5]);
55-
"append of huge lists">::
56-
ael (List.range 0 2_000_000)
57-
(L.append (List.range 0 1_000_000) (List.range 1_000_000 2_000_000));
5842
"concat of empty list of lists">::
5943
ael [] (L.concat []);
6044
"concat of normal list of lists">::
6145
ael [1;2;3;4;5;6] (L.concat [[1;2];[3];[];[4;5;6]]);
62-
"concat of huge list of small lists">::
63-
ael (List.range 0 1_000_000)
64-
(L.concat (List.map ~f:(fun x -> [x]) (List.range 0 1_000_000)));
65-
"concat of small list of huge lists">::
66-
ael (List.range 0 1_000_000)
67-
(L.concat
68-
(List.map ~f:(fun x -> List.range (x*100_000) ((x+1)*100_000))
69-
(List.range 0 10)))
7046
]
7147

7248
let () =

0 commit comments

Comments
 (0)