From 5720120fa1874422e3dce6b7a7f818990617b970 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Wed, 31 Jan 2018 20:07:04 -0600 Subject: [PATCH] more tests --- src/core/CCList.ml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/core/CCList.ml b/src/core/CCList.ml index 04ae2049..3da6407f 100644 --- a/src/core/CCList.ml +++ b/src/core/CCList.ml @@ -1021,6 +1021,7 @@ let uniq ~eq l = in uniq eq [] l (*$T + uniq ~eq:CCInt.equal [1;2;3] |> List.sort Pervasives.compare = [1;2;3] uniq ~eq:CCInt.equal [1;1;2;2;3;4;4;2;4;1;5] |> List.sort Pervasives.compare = [1;2;3;4;5] *) @@ -1458,6 +1459,10 @@ let of_seq seq = seq (fun x -> l := x :: !l); List.rev !l +(*$Q + Q.(list int) (fun l -> of_seq (to_seq l) = l) +*) + let to_gen l = let l = ref l in fun () -> @@ -1478,6 +1483,10 @@ let of_gen g = in direct direct_depth_default_ g +(*$Q + Q.(list int) (fun l -> of_gen(to_gen l) = l) +*) + let to_klist l = let rec make l () = match l with | [] -> `Nil