Skip to content

Commit 90e44a5

Browse files
committed
try to fix CI
1 parent 63c99cf commit 90e44a5

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

iter.opam

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ depends: [
1717
"ounit2" {with-test}
1818
"mdx" {with-test & >= "1.3" }
1919
"odoc" {with-doc}
20-
"containers" {with-test}
2120
]
2221
tags: [ "iter" "iterator" "iter" "fold" ]
2322
homepage: "https://github.com/c-cube/iter/"

tests/unit/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
(tests
33
(names t_iter)
4-
(libraries iter qcheck-core qcheck-core.runner ounit2 containers))
4+
(libraries iter qcheck-core qcheck-core.runner ounit2))

tests/unit/t_iter.ml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -237,21 +237,30 @@ let () =
237237
OUnit.assert_equal 2 n;
238238
()
239239

240+
let list_equal eq l1 l2 =
241+
List.length l1 = List.length l2 && List.for_all2 eq l1 l2
242+
240243
let () =
241-
OUnit.assert_equal
242-
~cmp:(CCList.equal Int.equal)
244+
OUnit.assert_equal ~cmp:(list_equal Int.equal)
243245
(1 -- 10
244-
|> map_while (fun x -> if x = 7 then `Return (x + 1) else `Yield (x - 1))
245-
|> to_list)
246-
[0; 1; 2; 3; 4; 5; 8]
246+
|> map_while (fun x ->
247+
if x = 7 then
248+
`Return (x + 1)
249+
else
250+
`Yield (x - 1))
251+
|> to_list)
252+
[ 0; 1; 2; 3; 4; 5; 8 ]
247253

248254
let () =
249-
OUnit.assert_equal
250-
~cmp:(CCList.equal Int.equal)
255+
OUnit.assert_equal ~cmp:(list_equal Int.equal)
251256
(1 -- 10
252-
|> map_while (fun x -> if x = 7 then `Stop else `Yield (x - 1))
253-
|> to_list)
254-
[0; 1; 2; 3; 4; 5]
257+
|> map_while (fun x ->
258+
if x = 7 then
259+
`Stop
260+
else
261+
`Yield (x - 1))
262+
|> to_list)
263+
[ 0; 1; 2; 3; 4; 5 ]
255264

256265
let () = 1 -- 5 |> drop 2 |> to_list |> OUnit.assert_equal [ 3; 4; 5 ]
257266
let () = 1 -- 5 |> rev |> to_list |> OUnit.assert_equal [ 5; 4; 3; 2; 1 ]

0 commit comments

Comments
 (0)