mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 03:05:29 -05:00
try to fix CI
This commit is contained in:
parent
63c99cf2ba
commit
90e44a59a9
3 changed files with 22 additions and 14 deletions
|
|
@ -17,7 +17,6 @@ depends: [
|
||||||
"ounit2" {with-test}
|
"ounit2" {with-test}
|
||||||
"mdx" {with-test & >= "1.3" }
|
"mdx" {with-test & >= "1.3" }
|
||||||
"odoc" {with-doc}
|
"odoc" {with-doc}
|
||||||
"containers" {with-test}
|
|
||||||
]
|
]
|
||||||
tags: [ "iter" "iterator" "iter" "fold" ]
|
tags: [ "iter" "iterator" "iter" "fold" ]
|
||||||
homepage: "https://github.com/c-cube/iter/"
|
homepage: "https://github.com/c-cube/iter/"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
|
||||||
(tests
|
(tests
|
||||||
(names t_iter)
|
(names t_iter)
|
||||||
(libraries iter qcheck-core qcheck-core.runner ounit2 containers))
|
(libraries iter qcheck-core qcheck-core.runner ounit2))
|
||||||
|
|
|
||||||
|
|
@ -237,19 +237,28 @@ let () =
|
||||||
OUnit.assert_equal 2 n;
|
OUnit.assert_equal 2 n;
|
||||||
()
|
()
|
||||||
|
|
||||||
|
let list_equal eq l1 l2 =
|
||||||
|
List.length l1 = List.length l2 && List.for_all2 eq l1 l2
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
OUnit.assert_equal
|
OUnit.assert_equal ~cmp:(list_equal Int.equal)
|
||||||
~cmp:(CCList.equal Int.equal)
|
|
||||||
(1 -- 10
|
(1 -- 10
|
||||||
|> map_while (fun x -> if x = 7 then `Return (x + 1) else `Yield (x - 1))
|
|> map_while (fun x ->
|
||||||
|
if x = 7 then
|
||||||
|
`Return (x + 1)
|
||||||
|
else
|
||||||
|
`Yield (x - 1))
|
||||||
|> to_list)
|
|> to_list)
|
||||||
[ 0; 1; 2; 3; 4; 5; 8 ]
|
[ 0; 1; 2; 3; 4; 5; 8 ]
|
||||||
|
|
||||||
let () =
|
let () =
|
||||||
OUnit.assert_equal
|
OUnit.assert_equal ~cmp:(list_equal Int.equal)
|
||||||
~cmp:(CCList.equal Int.equal)
|
|
||||||
(1 -- 10
|
(1 -- 10
|
||||||
|> map_while (fun x -> if x = 7 then `Stop else `Yield (x - 1))
|
|> map_while (fun x ->
|
||||||
|
if x = 7 then
|
||||||
|
`Stop
|
||||||
|
else
|
||||||
|
`Yield (x - 1))
|
||||||
|> to_list)
|
|> to_list)
|
||||||
[ 0; 1; 2; 3; 4; 5 ]
|
[ 0; 1; 2; 3; 4; 5 ]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue