use combinators from next version of qtest

This commit is contained in:
Simon Cruanes 2015-09-15 01:27:34 +02:00
parent afbe00cbe9
commit b12e7e7f8f
2 changed files with 7 additions and 8 deletions

View file

@ -5,12 +5,11 @@
module M = Make(CCInt) ;;
let _listuniq =
let g, p = Q.(list (pair small_int small_int)) in
let g' st =
let l = g st in
CCList.Set.uniq ~eq:(fun a b -> fst a=fst b) l
in
g', p
let g = Q.(list (pair small_int small_int)) in
Q.map_same_type
(fun l ->
CCList.Set.uniq ~eq:(fun a b -> fst a=fst b) l
) g
;;
*)

View file

@ -16,7 +16,7 @@
| Remove of int
| Remove_min
let gen_op () = CCRandom.(run ?st:None @@ choose_exn
let gen_op = CCRandom.(choose_exn
[ return Remove_min
; map (fun x->Remove x) 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
) m l
let op = gen_op, pp_op
let op = Q.make ~print:pp_op gen_op
*)