mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
19 lines
499 B
OCaml
19 lines
499 B
OCaml
|
|
open CCRandom
|
|
|
|
module T = (val Containers_testlib.make ~__FILE__ ())
|
|
include T;;
|
|
|
|
|
|
q Q.(list small_int) (fun l ->
|
|
l=[] || List.mem (run (pick_list l)) l);;
|
|
|
|
q Q.(pair small_int small_int) (fun (i,j) ->
|
|
let len, n = 2+min i j, max i j in
|
|
let l = QCheck.Gen.generate1 (split_list n ~len) in
|
|
match l with None -> true | Some l -> l<> [] && List.for_all (fun x->x>0) l);;
|
|
|
|
t @@ fun () ->
|
|
let open Containers in
|
|
ignore (List.random_choose [1;2;3] (Random.get_state()) : int);
|
|
true;;
|