mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
test: compat 4.03
This commit is contained in:
parent
feaa8ecf7d
commit
8b751754ba
1 changed files with 4 additions and 4 deletions
|
|
@ -39,7 +39,7 @@ q (Q.list Q.small_int) (fun l ->
|
||||||
q Q.small_int (fun size -> create ~size true |> cardinal = size);;
|
q Q.small_int (fun size -> create ~size true |> cardinal = size);;
|
||||||
|
|
||||||
q Q.small_int (fun size ->
|
q Q.small_int (fun size ->
|
||||||
create ~size true |> to_sorted_list = List.init size CCFun.id)
|
create ~size true |> to_sorted_list = CCList.init size CCFun.id)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
t ~name:(spf "line %d" __LINE__) @@ fun () ->
|
t ~name:(spf "line %d" __LINE__) @@ fun () ->
|
||||||
|
|
@ -225,7 +225,7 @@ q
|
||||||
let l1 = bv |> to_sorted_list in
|
let l1 = bv |> to_sorted_list in
|
||||||
let l2 =
|
let l2 =
|
||||||
CCList.init (length bv) (get bv)
|
CCList.init (length bv) (get bv)
|
||||||
|> List.mapi (fun i b -> i, b)
|
|> CCList.mapi (fun i b -> i, b)
|
||||||
|> CCList.filter_map (function
|
|> CCList.filter_map (function
|
||||||
| i, true -> Some i
|
| i, true -> Some i
|
||||||
| _ -> None)
|
| _ -> None)
|
||||||
|
|
@ -629,7 +629,7 @@ module Op = struct
|
||||||
(* random list of integers *)
|
(* random list of integers *)
|
||||||
let rand_list =
|
let rand_list =
|
||||||
0 -- 200 >>= fun n st ->
|
0 -- 200 >>= fun n st ->
|
||||||
List.init n (fun i ->
|
CCList.init n (fun i ->
|
||||||
if bool st then
|
if bool st then
|
||||||
Some i
|
Some i
|
||||||
else
|
else
|
||||||
|
|
@ -762,7 +762,7 @@ module Ref_ = struct
|
||||||
| Filter_is_odd -> self.set <- Intset.filter (fun x -> x mod 2 = 1) self.set
|
| Filter_is_odd -> self.set <- Intset.filter (fun x -> x mod 2 = 1) self.set
|
||||||
| Negate ->
|
| Negate ->
|
||||||
let l' =
|
let l' =
|
||||||
List.init self.size (fun x -> x)
|
CCList.init self.size (fun x -> x)
|
||||||
|> List.filter (fun x -> not (Intset.mem x self.set))
|
|> List.filter (fun x -> not (Intset.mem x self.set))
|
||||||
in
|
in
|
||||||
self.set <- Intset.of_list l'
|
self.set <- Intset.of_list l'
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue