mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 04:05:30 -05:00
use combinators from next version of qtest
This commit is contained in:
parent
afbe00cbe9
commit
b12e7e7f8f
2 changed files with 7 additions and 8 deletions
|
|
@ -5,12 +5,11 @@
|
||||||
module M = Make(CCInt) ;;
|
module M = Make(CCInt) ;;
|
||||||
|
|
||||||
let _listuniq =
|
let _listuniq =
|
||||||
let g, p = Q.(list (pair small_int small_int)) in
|
let g = Q.(list (pair small_int small_int)) in
|
||||||
let g' st =
|
Q.map_same_type
|
||||||
let l = g st in
|
(fun l ->
|
||||||
CCList.Set.uniq ~eq:(fun a b -> fst a=fst b) l
|
CCList.Set.uniq ~eq:(fun a b -> fst a=fst b) l
|
||||||
in
|
) g
|
||||||
g', p
|
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
| Remove of int
|
| Remove of int
|
||||||
| Remove_min
|
| Remove_min
|
||||||
|
|
||||||
let gen_op () = CCRandom.(run ?st:None @@ choose_exn
|
let gen_op = CCRandom.(choose_exn
|
||||||
[ return Remove_min
|
[ return Remove_min
|
||||||
; map (fun x->Remove x) small_int
|
; map (fun x->Remove x) small_int
|
||||||
; pure (fun x y->Add (x,y)) <*> small_int <*> small_int])
|
; pure (fun x y->Add (x,y)) <*> small_int <*> small_int])
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
try let _, _, m' = M.extract_min m in m' with Not_found -> m
|
try let _, _, m' = M.extract_min m in m' with Not_found -> m
|
||||||
) m l
|
) m l
|
||||||
|
|
||||||
let op = gen_op, pp_op
|
let op = Q.make ~print:pp_op gen_op
|
||||||
|
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue