diff --git a/src/core/CCArray.ml b/src/core/CCArray.ml index a075efa9..3f4b0ec4 100644 --- a/src/core/CCArray.ml +++ b/src/core/CCArray.ml @@ -170,7 +170,7 @@ let sort_indices cmp a = *) (*$Q - Q.(array printable_string) (fun a -> \ + Q.(array_of_size Gen.(0 -- 30) printable_string) (fun a -> \ let b = sort_indices String.compare a in \ sorted String.compare a = Array.map (Array.get a) b) *) @@ -485,7 +485,7 @@ let swap a i j = *) (*$QR - Q.(array small_int) (fun a -> + Q.(array_of_size Gen.(0 -- 100) small_int) (fun a -> let b = Array.copy a in for i = 0 to Array.length a-1 do for j = i+1 to Array.length a-1 do diff --git a/src/core/CCParse.ml b/src/core/CCParse.ml index 2570a512..50dd98ca 100644 --- a/src/core/CCParse.ml +++ b/src/core/CCParse.ml @@ -68,8 +68,7 @@ assert_equal ~printer:Q.Print.(list int) l l' in - test 100_000; - test 400_000; + test 300_000; *) diff --git a/src/core/CCString.ml b/src/core/CCString.ml index c127e097..0c813d5b 100644 --- a/src/core/CCString.ml +++ b/src/core/CCString.ml @@ -918,7 +918,7 @@ let unlines_gen g = *) (*$Q - Q.(list string) (fun l -> \ + Q.(small_list small_string) (fun l -> \ let l = unlines l |> lines in \ l = (unlines l |> lines)) *) diff --git a/src/core/CCUtf8_string.ml b/src/core/CCUtf8_string.ml index 60ccf1b5..11eca5dd 100644 --- a/src/core/CCUtf8_string.ml +++ b/src/core/CCUtf8_string.ml @@ -263,13 +263,13 @@ let of_string s = if is_valid s then Some s else None *) (*$QR - Q.string (fun s -> + Q.small_string (fun s -> Q.assume (CCString.for_all (fun c -> Char.code c < 128) s); is_valid s) *) (*$QR & ~long_factor:10 - Q.string (fun s -> + Q.small_string (fun s -> Q.assume (CCString.for_all (fun c -> Char.code c < 128) s); s = (of_string_exn s |> to_seq |> of_seq |> to_string) ) @@ -312,8 +312,8 @@ let of_string s = if is_valid s then Some s else None (* compare with uutf *) -(*$QR & ~long_factor:40 ~count:100_000 - Q.string (fun s -> +(*$QR & ~long_factor:40 ~count:50_000 + Q.small_string (fun s -> let v1 = is_valid s in let v2 = uutf_is_valid s in if v1=v2 then true @@ -321,8 +321,8 @@ let of_string s = if is_valid s then Some s else None ) *) -(*$QR & ~long_factor:40 ~count:100_000 - Q.string (fun s -> +(*$QR & ~long_factor:40 ~count:50_000 + Q.small_string (fun s -> Q.assume (is_valid s && uutf_is_valid s); let pp s = Q.Print.(list pp_uchar) s in let l_uutf = uutf_to_seq s |> Sequence.to_list in diff --git a/src/data/CCRingBuffer.ml b/src/data/CCRingBuffer.ml index 7c2e88b7..dc5cc173 100644 --- a/src/data/CCRingBuffer.ml +++ b/src/data/CCRingBuffer.ml @@ -744,7 +744,7 @@ module Make(Elt:sig ~print:str_of_op gen_op - let arb_ops = Q.list arb_op + let arb_ops = Q.list_of_size Q.Gen.(0 -- 20) arb_op module L_impl = struct type t = {