mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 20:25:28 -05:00
cleanup and more tests in CCHeap
This commit is contained in:
parent
c3b1d0db38
commit
13f6660373
2 changed files with 15 additions and 2 deletions
|
|
@ -64,6 +64,19 @@ end
|
||||||
)
|
)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
(* test filter *)
|
||||||
|
(*$QR & ~count:30
|
||||||
|
Q.(list_of_size Gen.(return 1_000) int) (fun l ->
|
||||||
|
(* put elements into a heap *)
|
||||||
|
let h = H.of_seq (Sequence.of_list l) in
|
||||||
|
let h = H.filter (fun x->x mod 2=0) h in
|
||||||
|
OUnit.assert_bool "all odd"
|
||||||
|
(H.to_seq h |> Sequence.for_all (fun x -> x mod 2 = 0));
|
||||||
|
let l' = extract_list h in
|
||||||
|
is_sorted l'
|
||||||
|
)
|
||||||
|
*)
|
||||||
|
|
||||||
module type S = sig
|
module type S = sig
|
||||||
type elt
|
type elt
|
||||||
type t
|
type t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue