mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
Add a regression test
This commit is contained in:
parent
0ed3c70669
commit
3d27bd285e
1 changed files with 15 additions and 0 deletions
|
|
@ -680,6 +680,21 @@ module Make(W : WORD)
|
|||
(T.below [1;1] t1 |> Sequence.to_list)
|
||||
*)
|
||||
|
||||
(* NOTE: Regression test. See #158 *)
|
||||
(*$T
|
||||
let module TPoly = Make (struct \
|
||||
type t = (unit -> char) list \
|
||||
type char_ = char \
|
||||
let compare = compare \
|
||||
let to_seq a k = List.iter (fun c -> k (c ())) a \
|
||||
let of_list l = List.map (fun c -> (fun () -> c)) l \
|
||||
end) \
|
||||
in \
|
||||
let trie = TPoly.of_list [[fun () -> 'a'], 1; [fun () -> 'b'], 2] in \
|
||||
ignore (TPoly.below [fun () -> 'a'] trie |> Sequence.to_list); \
|
||||
true
|
||||
*)
|
||||
|
||||
(*$Q & ~count:30
|
||||
Q.(list_of_size Gen.(0--100) (pair printable_string small_int)) (fun l -> \
|
||||
let t = S.of_list l in \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue