diff --git a/example/alcotest/dune b/example/alcotest/dune index ca82186c..aebb720f 100644 --- a/example/alcotest/dune +++ b/example/alcotest/dune @@ -6,7 +6,6 @@ (rule (targets output.txt) (deps ./QCheck_alcotest_test.exe) - (package qcheck-alcotest) (enabled_if (= %{os_type} "Unix")) (action (with-accepted-exit-codes @@ -19,5 +18,6 @@ (rule (alias runtest) + (package qcheck-alcotest) (enabled_if (= %{os_type} "Unix")) (action (diff output.txt.expected output.txt))) diff --git a/example/dune b/example/dune index 345449cc..fe4b2715 100644 --- a/example/dune +++ b/example/dune @@ -6,7 +6,6 @@ (rule (targets output.txt) (deps ./QCheck_runner_test.exe) - (package qcheck-core) (enabled_if (= %{os_type} "Unix")) (action (with-accepted-exit-codes @@ -18,4 +17,5 @@ (rule (alias runtest) (enabled_if (= %{os_type} "Unix")) + (package qcheck) (action (diff output.txt.expected output.txt))) diff --git a/example/ounit/dune b/example/ounit/dune index 0162c96a..86554a74 100644 --- a/example/ounit/dune +++ b/example/ounit/dune @@ -1,12 +1,11 @@ (executables (names QCheck_ounit_test QCheck_test) - (libraries qcheck ounit2 qcheck-ounit)) + (libraries ounit2 qcheck-ounit)) (rule (targets output.txt) (deps ./QCheck_ounit_test.exe) - (package qcheck-ounit) (enabled_if (= %{os_type} "Unix")) (action (with-accepted-exit-codes @@ -17,5 +16,6 @@ (rule (alias runtest) + (package qcheck-ounit) (enabled_if (= %{os_type} "Unix")) (action (diff output.txt.expected output.txt))) diff --git a/src/core/QCheck2.ml b/src/core/QCheck2.ml index a3dea662..e7936d4b 100644 --- a/src/core/QCheck2.ml +++ b/src/core/QCheck2.ml @@ -1693,20 +1693,24 @@ module Test = struct median := i)); (* group by buckets, if there are too many entries: *) (* first compute histogram and bucket size *) + let min_idx64, max_idx64 = Int64.(of_int min_idx, of_int max_idx) in let hist_size, bucket_size = - let sample_width = Int64.(sub (of_int max_idx) (of_int min_idx)) in + let sample_width = Int64.sub max_idx64 min_idx64 in if sample_width > Int64.of_int stat_max_lines then stat_max_lines, int_of_float (ceil (Int64.to_float sample_width /. float_of_int stat_max_lines)) else max_idx-min_idx, 1 in - let hist_size = if min_idx + bucket_size * hist_size <= max_idx then 1+hist_size else hist_size in + let hist_size = + if Int64.(add min_idx64 (mul (of_int bucket_size) (of_int hist_size))) <= max_idx64 + then 1+hist_size + else hist_size in (* accumulate bucket counts *) let max_val = ref 0 in (* max value after grouping by buckets *) let bucket_count = Array.init hist_size (fun _ -> 0) in Hashtbl.iter (fun j count -> - let bucket = Int64.(to_int (div (sub (of_int j) (of_int min_idx)) (of_int bucket_size))) in + let bucket = Int64.(to_int (div (sub (of_int j) min_idx64) (of_int bucket_size))) in let new_count = bucket_count.(bucket) + count in bucket_count.(bucket) <- new_count; max_val := max !max_val new_count) tbl; @@ -1717,9 +1721,8 @@ module Test = struct " num: %d, avg: %.2f, stddev: %.2f, median %d, min %d, max %d\n" !num !avg stddev !median min_idx max_idx; let indwidth = - max (String.length (Printf.sprintf "%d" min_idx)) - (max (String.length (Printf.sprintf "%d" max_idx)) - (String.length (Printf.sprintf "%d" (min_idx + bucket_size * hist_size)))) in + let str_width i = String.length (Printf.sprintf "%d" i) in + List.map str_width [min_idx; max_idx; min_idx + bucket_size * hist_size] |> List.fold_left max min_int in let labwidth = if bucket_size=1 then indwidth else 2+2*indwidth in for i = 0 to hist_size - 1 do let i' = min_idx + i * bucket_size in diff --git a/src/dune b/src/dune index 59f9f1d6..7f18afde 100644 --- a/src/dune +++ b/src/dune @@ -3,7 +3,6 @@ (name qcheck) (public_name qcheck) (wrapped false) - (optional) (modules QCheck_runner) (synopsis "compatibility library for qcheck") (libraries qcheck-core qcheck-core.runner qcheck-ounit)) diff --git a/src/ounit/dune b/src/ounit/dune index cb45b69a..2fadb7a4 100644 --- a/src/ounit/dune +++ b/src/ounit/dune @@ -2,7 +2,6 @@ (library (name qcheck_ounit) (public_name qcheck-ounit) - (optional) (wrapped false) (libraries unix bytes qcheck-core qcheck-core.runner ounit2) (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string) diff --git a/test/core/QCheck2_expect_test.ml b/test/core/QCheck2_expect_test.ml new file mode 100644 index 00000000..970312d9 --- /dev/null +++ b/test/core/QCheck2_expect_test.ml @@ -0,0 +1,412 @@ +(** QCheck2 tests **) + +(* tests of overall functionality *) +module Overall = struct + open QCheck2 + + let passing = + Test.make ~name:"list_rev_is_involutive" ~count:100 ~long_factor:100 + ~print:Print.(list int) + Gen.(list small_int) (fun l -> List.rev (List.rev l) = l) + + let failing = + Test.make ~name:"should_fail_sort_id" ~count:10 ~print:Print.(list int) + Gen.(small_list small_int) (fun l -> l = List.sort compare l) + + exception Error + + let error = + Test.make ~name:"should_error_raise_exn" ~count:10 ~print:Print.int + Gen.int (fun _ -> raise Error) + + let collect = + Test.make ~name:"collect_results" ~count:100 ~long_factor:100 + ~print:Print.int ~collect:string_of_int + (Gen.int_bound 4) (fun _ -> true) + + let stats = + Test.make ~name:"with_stats" ~count:100 ~long_factor:100 ~print:Print.int + ~stats:[ + "mod4", (fun i->i mod 4); + "num", (fun i->i); + ] + (Gen.int_bound 120) (fun _ -> true) + + let bad_assume_warn = + Test.make ~name:"WARN_unlikely_precond" ~count:2_000 ~print:Print.int + Gen.int + (fun x -> + QCheck.assume (x mod 100 = 1); + true) + + let bad_assume_fail = + Test.make ~name:"FAIL_unlikely_precond" ~count:2_000 + ~if_assumptions_fail:(`Fatal, 0.1) ~print:Print.int + Gen.int + (fun x -> + QCheck.assume (x mod 100 = 1); + true) +end + +(* positive tests of the various generators *) +module Generator = struct + open QCheck2 + + (* example from issue #23 *) + let char_dist_issue_23 = + Test.make ~name:"char never produces '\\255'" ~count:1_000_000 + ~print:Print.char + Gen.char (fun c -> c <> '\255') + + let char_test = + Test.make ~name:"char has right range'" ~count:1000 ~print:Print.char + Gen.char (fun c -> '\000' <= c && c <= '\255') + + let nat_test = + Test.make ~name:"nat has right range" ~count:1000 ~print:Print.int + Gen.nat (fun n -> 0 <= n && n < 10000) + + let string_test = + Test.make ~name:"string has right length and content" ~count:1000 ~print:Print.string + Gen.string + (fun s -> + let len = String.length s in + 0 <= len && len < 10000 + && String.to_seq s |> + Seq.fold_left (fun acc c -> acc && '\000' <= c && c <= '\255') true) + + let list_test = + Test.make ~name:"list has right length" ~count:1000 + ~print:Print.(list unit) + Gen.(list unit) (fun l -> let len = List.length l in 0 <= len && len < 10_000) + + let list_repeat_test = + Test.make ~name:"list_repeat has constant length" ~count:1000 + ~print:Print.(pair int (list unit)) + Gen.(small_nat >>= fun i -> list_repeat i unit >>= fun l -> return (i,l)) + (fun (i,l) -> List.length l = i) + + let array_repeat_test = + Test.make ~name:"array_repeat has constant length" ~count:1000 + ~print:Print.(pair int (array unit)) + Gen.(small_nat >>= fun i -> array_repeat i unit >>= fun l -> return (i,l)) + (fun (i,l) -> Array.length l = i) +end + +(* negative tests that exercise shrinking behaviour *) +module Shrink = struct + open QCheck2 + + let rec fac n = match n with + | 0 -> 1 + | n -> n * fac (n - 1) + + (* example from issue #59 *) + let test_fac_issue59 = + Test.make ~name:"test fac issue59" + (Gen.make_primitive ~gen:(fun st -> Gen.generate1 ~rand:st (Gen.small_int_corners ())) ~shrink:(fun _ -> Seq.empty)) + (fun n -> try (fac n) mod n = 0 + with + (*| Stack_overflow -> false*) + | Division_by_zero -> (n=0)) + + let big_bound_issue59 = + Test.make ~name:"big bound issue59" ~print:Print.int + (Gen.small_int_corners()) (fun i -> i < 209609) + + let long_shrink = + let listgen = Gen.(list_size (int_range 1000 10000) int) in + Test.make ~name:"long_shrink" ~print:Print.(pair (list int) (list int)) + (Gen.pair listgen listgen) + (fun (xs,ys) -> List.rev (xs@ys) = (List.rev xs)@(List.rev ys)) + + let ints_arent_0_mod_3 = + Test.make ~name:"ints arent 0 mod 3" ~count:1000 ~print:Print.int + Gen.int (fun i -> i mod 3 <> 0) + + let ints_are_0 = + Test.make ~name:"ints are 0" ~count:1000 ~print:Print.int + Gen.int (fun i -> Printf.printf "%i\n" i; i = 0) + + (* test from issue #59 *) + let ints_smaller_209609 = + Test.make ~name:"ints < 209609" ~print:Print.int + (Gen.small_int_corners()) (fun i -> i < 209609) + + let nats_smaller_5001 = + Test.make ~name:"nat < 5001" ~count:1000 ~print:Print.int + Gen.nat (fun n -> n < 5001) + + let char_is_never_abcdef = + Test.make ~name:"char is never produces 'abcdef'" ~count:1000 ~print:Print.char + Gen.char (fun c -> not (List.mem c ['a';'b';'c';'d';'e';'f'])) + + let strings_are_empty = + Test.make ~name:"strings are empty" ~count:1000 ~print:Print.string + Gen.string (fun s -> (*Printf.printf "\"%s\"\n" (String.escaped s);*) s = "") + + let string_never_has_000_char = + Test.make ~name:"string never has a \\000 char" ~count:1000 ~print:Print.string + Gen.string + (fun s -> String.to_seq s |> Seq.fold_left (fun acc c -> acc && c <> '\000') true) + + let string_never_has_255_char = + Test.make ~name:"string never has a \\255 char" ~count:1000 ~print:Print.string + Gen.string + (fun s -> String.to_seq s |> Seq.fold_left (fun acc c -> acc && c <> '\255') true) + + (* tests from issue #64 *) + let print_list xs = print_endline Print.(list int xs) + + let lists_are_empty_issue_64 = + Test.make ~name:"lists are empty" ~print:Print.(list int) + Gen.(list small_int) (fun xs -> print_list xs; xs = []) + + let list_shorter_10 = + Test.make ~name:"lists shorter than 10" ~print:Print.(list int) + Gen.(list small_int) (fun xs -> (*print_list xs;*) List.length xs < 10) + + let length_printer xs = + Printf.sprintf "[...] list length: %i" (List.length xs) + + let size_gen = Gen.(oneof [small_nat; int_bound 750_000]) + + let list_shorter_432 = + Test.make ~name:"lists shorter than 432" ~print:length_printer + Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) + (fun xs -> (*print_list xs;*) List.length xs < 432) + + let list_shorter_4332 = + Test.make ~name:"lists shorter than 4332" ~print:length_printer + Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) + (fun xs -> (*print_list xs;*) List.length xs < 4332) + + let list_equal_dupl = + Test.make ~name:"lists equal to duplication" ~print:length_printer + Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) + (fun xs -> try xs = xs @ xs + with Stack_overflow -> false) + + let list_unique_elems = + Test.make ~name:"lists have unique elems" ~print:Print.(list int) + Gen.(list small_int) + (fun xs -> let ys = List.sort_uniq Int.compare xs in + print_list xs; List.length xs = List.length ys) +end + +(* tests function generator and shrinker *) +module Function = struct + open QCheck2 + + let fail_pred_map_commute = + Test.make ~name:"fail_pred_map_commute" ~count:100 ~long_factor:100 + ~print:Print.(triple (list int) Fn.print Fn.print) + Gen.(triple + (small_list small_int) + (fun1 ~print:Print.int Observable.int int) + (fun1 ~print:Print.bool Observable.int bool)) + (fun (l,Fun (_,f),Fun (_,p)) -> + List.filter p (List.map f l) = List.map f (List.filter p l)) + + let fail_pred_strings = + Test.make ~name:"fail_pred_strings" ~count:100 ~print:Fn.print + (fun1 Observable.string ~print:Print.bool Gen.bool) + (fun (Fun (_,p)) -> not (p "some random string") || p "some other string") + + let int_gen = Gen.small_nat (* int *) + + (* Another example (false) property *) + let prop_foldleft_foldright = + Test.make ~name:"fold_left fold_right" ~count:1000 ~long_factor:20 + ~print:Print.(triple int (list int) Fn.print) + Gen.(triple + int_gen + (list int_gen) + (fun2 ~print:Print.int Observable.int Observable.int int_gen)) + (fun (z,xs,f) -> + let l1 = List.fold_right (Fn.apply f) xs z in + let l2 = List.fold_left (Fn.apply f) z xs in + if l1=l2 then true + else Test.fail_reportf "l=%s, fold_left=%s, fold_right=%s@." + (Print.(list int) xs) + (Print.int l1) + (Print.int l2) + ) + + (* Another example (false) property *) + let prop_foldleft_foldright_uncurry = + Test.make ~name:"fold_left fold_right uncurried" ~count:1000 ~long_factor:20 + ~print:Print.(triple Fn.print int (list int)) + Gen.(triple + (fun1 ~print:Print.int Observable.(pair int int) int_gen) + int_gen + (list int_gen)) + (fun (f,z,xs) -> + List.fold_right (fun x y -> Fn.apply f (x,y)) xs z = + List.fold_left (fun x y -> Fn.apply f (x,y)) z xs) + + (* Same as the above (false) property, but generating+shrinking functions last *) + let prop_foldleft_foldright_uncurry_funlast = + Test.make ~name:"fold_left fold_right uncurried fun last" ~count:1000 ~long_factor:20 + ~print:Print.(triple int (list int) Fn.print) + Gen.(triple + int_gen + (list int_gen) + (fun1 ~print:Print.int Observable.(pair int int) int_gen)) + (fun (z,xs,f) -> + List.fold_right (fun x y -> Fn.apply f (x,y)) xs z = + List.fold_left (fun x y -> Fn.apply f (x,y)) z xs) + + (* test from issue #64 *) + let fold_left_test = + Test.make ~name:"fold_left test, fun first" ~print:Print.(quad Fn.print string (list int) (list int)) + Gen.(quad (* string -> int -> string *) + (fun2 ~print:Print.string Observable.string Observable.int (small_string ~gen:char)) + (small_string ~gen:char) + (list small_int) + (list small_int)) + (fun (f,acc,is,js) -> + let f = Fn.apply f in + List.fold_left f acc (is @ js) + = List.fold_left f (List.fold_left f acc is) is) (*Typo*) +end + +(* tests of (inner) find_example(_gen) behaviour *) +module FindExample = struct + open QCheck2 + + let find_ex = + Test.make ~name:"find_example" ~print:Print.int + Gen.(2--50) + (fun n -> + let st = Random.State.make [| 0 |] in + let f m = n < m && m < 2 * n in + try + let m = find_example_gen ~rand:st ~count:100_000 ~f Gen.(0 -- 1000) in + f m + with No_example_found _ -> false) + + let find_ex_uncaught_issue_99_1_fail = + let rs = (find_example ~count:10 ~f:(fun _ -> false) Gen.int) in + Test.make ~name:"FAIL_#99_1" rs (fun _ -> true) + + let find_ex_uncaught_issue_99_2_succeed = + Test.make ~name:"should_succeed_#99_2" ~count:10 + Gen.int (fun i -> i <= max_int) +end + +(* tests of statistics and histogram display *) +module Stats = struct + open QCheck2 + + let bool_dist = + Test.make ~name:"bool dist" ~count:500_000 ~collect:Bool.to_string Gen.bool (fun _ -> true) + + let char_dist = + Test.make ~name:"char code dist" ~count:500_000 ~stats:[("char code", Char.code)] Gen.char (fun _ -> true) + + let string_len_tests = + let len = ("len",String.length) in + [ + Test.make ~name:"string_size len dist" ~count:5_000 ~stats:[len] Gen.(string_size (int_range 5 10)) (fun _ -> true); + Test.make ~name:"string len dist" ~count:5_000 ~stats:[len] Gen.string (fun _ -> true); + Test.make ~name:"string_of len dist" ~count:5_000 ~stats:[len] Gen.(string_of (return 'a')) (fun _ -> true); + Test.make ~name:"string_readable len dist" ~count:5_000 ~stats:[len] Gen.string_readable (fun _ -> true); + Test.make ~name:"small_string len dist" ~count:5_000 ~stats:[len] Gen.(small_string ~gen:char)(*ugh*)(fun _ -> true); + ] + + let list_len_tests = + let len = ("len",List.length) in + [ (* test from issue #30 *) + Test.make ~name:"list len dist" ~count:5_000 ~stats:[len] Gen.(list int) (fun _ -> true); + Test.make ~name:"small_list len dist" ~count:5_000 ~stats:[len] Gen.(small_list int) (fun _ -> true); + Test.make ~name:"list_size len dist" ~count:5_000 ~stats:[len] Gen.(list_size (int_range 5 10) int) (fun _ -> true); + Test.make ~name:"list_repeat len dist" ~count:5_000 ~stats:[len] Gen.(list_repeat 42 int) (fun _ -> true); + ] + + let array_len_tests = + let len = ("len",Array.length) in + [ + Test.make ~name:"array len dist" ~count:5_000 ~stats:[len] Gen.(array int) (fun _ -> true); + Test.make ~name:"small_array len dist" ~count:5_000 ~stats:[len] Gen.(small_array int) (fun _ -> true); + Test.make ~name:"array_size len dist" ~count:5_000 ~stats:[len] Gen.(array_size (int_range 5 10) int) (fun _ -> true); + Test.make ~name:"array_repeat len dist" ~count:5_000 ~stats:[len] Gen.(array_repeat 42 int) (fun _ -> true); + ] + + let int_dist_tests = + let dist = ("dist",fun x -> x) in + [ + (* test from issue #40 *) + Test.make ~name:"int_stats_neg" ~count:5000 ~stats:[dist] Gen.small_signed_int (fun _ -> true); + (* distribution tests from PR #45 *) + Test.make ~name:"small_signed_int dist" ~count:1000 ~stats:[dist] Gen.small_signed_int (fun _ -> true); + Test.make ~name:"small_nat dist" ~count:1000 ~stats:[dist] Gen.small_nat (fun _ -> true); + Test.make ~name:"nat dist" ~count:1000 ~stats:[dist] Gen.nat (fun _ -> true); + Test.make ~name:"int_range (-43643) 435434 dist" ~count:1000 ~stats:[dist] (Gen.int_range (-43643) 435434) (fun _ -> true); + Test.make ~name:"int_range (-40000) 40000 dist" ~count:1000 ~stats:[dist] (Gen.int_range (-40000) 40000) (fun _ -> true); + Test.make ~name:"int_range (-4) 4 dist" ~count:1000 ~stats:[dist] (Gen.int_range (-4) 4) (fun _ -> true); + Test.make ~name:"int_range (-4) 17 dist" ~count:1000 ~stats:[dist] (Gen.int_range (-4) 17) (fun _ -> true); + Test.make ~name:"int dist" ~count:100000 ~stats:[dist] Gen.int (fun _ -> true); + Test.make ~name:"oneof int dist" ~count:1000 ~stats:[dist] (Gen.oneofl[min_int;-1;0;1;max_int]) (fun _ -> true); + ] + + let int_dist_empty_bucket = + Test.make ~name:"int_dist_empty_bucket" ~count:1_000 ~stats:[("dist",fun x -> x)] + Gen.(oneof [small_int_corners ();int]) (fun _ -> true) +end + +(* Calling runners *) + +let () = QCheck_base_runner.set_seed 1234 +let _ = + QCheck_base_runner.run_tests ~colors:false ([ + Overall.passing; + Overall.failing; + Overall.error; + Overall.collect; + Overall.stats; + Overall.bad_assume_warn; + Overall.bad_assume_fail; + Generator.char_dist_issue_23; + Generator.char_test; + Generator.nat_test; + Generator.string_test; + Generator.list_test; + Generator.list_repeat_test; + Generator.array_repeat_test; + (*Shrink.test_fac_issue59;*) + Shrink.big_bound_issue59; + Shrink.long_shrink; + Shrink.ints_arent_0_mod_3; + Shrink.ints_are_0; + Shrink.ints_smaller_209609; + Shrink.nats_smaller_5001; + Shrink.char_is_never_abcdef; + Shrink.strings_are_empty; + Shrink.string_never_has_000_char; + Shrink.string_never_has_255_char; + Shrink.lists_are_empty_issue_64; + Shrink.list_shorter_10; + Shrink.list_shorter_432; + Shrink.list_shorter_4332; + Shrink.list_equal_dupl; + Shrink.list_unique_elems; + Function.fail_pred_map_commute; + Function.fail_pred_strings; + Function.prop_foldleft_foldright; + Function.prop_foldleft_foldright_uncurry; + Function.prop_foldleft_foldright_uncurry_funlast; + Function.fold_left_test; + FindExample.find_ex; + FindExample.find_ex_uncaught_issue_99_1_fail; + FindExample.find_ex_uncaught_issue_99_2_succeed; + Stats.bool_dist; + Stats.char_dist] + @ Stats.string_len_tests + @ Stats.list_len_tests + @ Stats.array_len_tests + @ Stats.int_dist_tests) + +let () = QCheck_base_runner.set_seed 153870556 +let _ = QCheck_base_runner.run_tests ~colors:false [Stats.int_dist_empty_bucket] + diff --git a/test/core/QCheck_expect_test.ml b/test/core/QCheck_expect_test.ml new file mode 100644 index 00000000..97a8dd28 --- /dev/null +++ b/test/core/QCheck_expect_test.ml @@ -0,0 +1,399 @@ +(** QCheck(1) tests **) + +(* tests of overall functionality *) +module Overall = struct + open QCheck + + let passing = + Test.make ~name:"list_rev_is_involutive" ~count:100 ~long_factor:100 + (list small_int) (fun l -> List.rev (List.rev l) = l) + + let failing = + Test.make ~name:"should_fail_sort_id" ~count:10 + (small_list small_int) (fun l -> l = List.sort compare l) + + exception Error + + let error = + Test.make ~name:"should_error_raise_exn" ~count:10 + int (fun _ -> raise Error) + + let collect = + Test.make ~name:"collect_results" ~count:100 ~long_factor:100 + (make ~collect:string_of_int (Gen.int_bound 4)) + (fun _ -> true) + + let stats = + Test.make ~name:"with_stats" ~count:100 ~long_factor:100 + (make (Gen.int_bound 120) + ~stats:[ + "mod4", (fun i->i mod 4); + "num", (fun i->i); + ]) + (fun _ -> true) + + let bad_assume_warn = + Test.make ~name:"WARN_unlikely_precond" ~count:2_000 + int + (fun x -> + QCheck.assume (x mod 100 = 1); + true) + + let bad_assume_fail = + Test.make ~name:"FAIL_unlikely_precond" ~count:2_000 + ~if_assumptions_fail:(`Fatal, 0.1) + int + (fun x -> + QCheck.assume (x mod 100 = 1); + true) +end + +(* positive tests of the various generators *) +module Generator = struct + open QCheck + + (* example from issue #23 *) + let char_dist_issue_23 = + Test.make ~name:"char never produces '\\255'" ~count:1_000_000 char (fun c -> c <> '\255') + + let char_test = + Test.make ~name:"char has right range'" ~count:1000 + char (fun c -> '\000' <= c && c <= '\255') + + let nat_test = + Test.make ~name:"nat has right range" ~count:1000 + (make ~print:Print.int Gen.nat) (fun n -> 0 <= n && n < 10000) + + let string_test = + Test.make ~name:"string has right length and content" ~count:1000 + string + (fun s -> + let len = String.length s in + 0 <= len && len < 10000 + && String.to_seq s |> + Seq.fold_left (fun acc c -> acc && '\000' <= c && c <= '\255') true) + + let list_test = + Test.make ~name:"list has right length" ~count:1000 + (list unit) (fun l -> let len = List.length l in 0 <= len && len < 10_000) + + let list_repeat_test = + let gen = Gen.(small_nat >>= fun i -> list_repeat i unit >>= fun l -> return (i,l)) in + Test.make ~name:"list_repeat has constant length" ~count:1000 + (make ~print:Print.(pair int (list unit)) gen) (fun (i,l) -> List.length l = i) + + let array_repeat_test = + let gen = Gen.(small_nat >>= fun i -> array_repeat i unit >>= fun l -> return (i,l)) in + Test.make ~name:"array_repeat has constant length" ~count:1000 + (make ~print:Print.(pair int (array unit)) gen) (fun (i,l) -> Array.length l = i) +end + +(* negative tests that exercise shrinking behaviour *) +module Shrink = struct + open QCheck + + let rec fac n = match n with + | 0 -> 1 + | n -> n * fac (n - 1) + + (* example from issue #59 *) + let test_fac_issue59 = + Test.make ~name:"test fac issue59" + (set_shrink Shrink.nil (small_int_corners ())) + (fun n -> try (fac n) mod n = 0 + with + (*| Stack_overflow -> false*) + | Division_by_zero -> (n=0)) + + let big_bound_issue59 = + Test.make ~name:"big bound issue59" + (small_int_corners()) (fun i -> i < 209609) + + let long_shrink = + let listgen = list_of_size (Gen.int_range 1000 10000) int in + Test.make ~name:"long_shrink" (pair listgen listgen) + (fun (xs,ys) -> List.rev (xs@ys) = (List.rev xs)@(List.rev ys)) + + let ints_arent_0_mod_3 = + Test.make ~name:"ints arent 0 mod 3" ~count:1000 + int (fun i -> i mod 3 <> 0) + + let ints_are_0 = + Test.make ~name:"ints are 0" ~count:1000 + int (fun i -> Printf.printf "%i\n" i; i = 0) + + (* test from issue #59 *) + let ints_smaller_209609 = + Test.make ~name:"ints < 209609" + (small_int_corners()) (fun i -> i < 209609) + + let nats_smaller_5001 = + Test.make ~name:"nat < 5001" ~count:1000 + (make ~print:Print.int ~shrink:Shrink.int Gen.nat) (fun n -> n < 5001) + + let char_is_never_abcdef = + Test.make ~name:"char is never produces 'abcdef'" ~count:1000 + char (fun c -> not (List.mem c ['a';'b';'c';'d';'e';'f'])) + + let strings_are_empty = + Test.make ~name:"strings are empty" ~count:1000 + string (fun s -> (*Printf.printf "\"%s\"\n" (String.escaped s);*) s = "") + + let string_never_has_000_char = + Test.make ~name:"string never has a \\000 char" ~count:1000 + string + (fun s -> String.to_seq s |> Seq.fold_left (fun acc c -> acc && c <> '\000') true) + + let string_never_has_255_char = + Test.make ~name:"string never has a \\255 char" ~count:1000 + string + (fun s -> String.to_seq s |> Seq.fold_left (fun acc c -> acc && c <> '\255') true) + + let print_list xs = print_endline Print.(list int xs) + (* test from issue #64 *) + let lists_are_empty_issue_64 = + Test.make ~name:"lists are empty" + (list small_int) (fun xs -> print_list xs; xs = []) + + let list_shorter_10 = + Test.make ~name:"lists shorter than 10" + (list small_int) (fun xs -> (*print_list xs;*) List.length xs < 10) + + let length_printer xs = + Printf.sprintf "[...] list length: %i" (List.length xs) + + let size_gen = Gen.(oneof [small_nat; int_bound 750_000]) + + let list_shorter_432 = + Test.make ~name:"lists shorter than 432" + (set_print length_printer (list_of_size size_gen small_int)) (*(list small_int)*) + (fun xs -> (*print_list xs;*) List.length xs < 432) + + let list_shorter_4332 = + Test.make ~name:"lists shorter than 4332" + (set_shrink Shrink.list_spine (set_print length_printer (list_of_size size_gen small_int))) + (fun xs -> (*print_list xs;*) List.length xs < 4332) + + let list_equal_dupl = + Test.make ~name:"lists equal to duplication" + (set_print length_printer (list_of_size size_gen small_int)) + (*(set_print length_printer (list small_int))*) + (fun xs -> try xs = xs @ xs + with Stack_overflow -> false) + + let list_unique_elems = + Test.make ~name:"lists have unique elems" + (list small_int) + (fun xs -> let ys = List.sort_uniq Int.compare xs in + print_list xs; List.length xs = List.length ys) +end + +(* tests function generator and shrinker *) +module Function = struct + open QCheck + + let fail_pred_map_commute = + Test.make ~name:"fail_pred_map_commute" ~count:100 ~long_factor:100 + (triple + (small_list small_int) + (fun1 Observable.int int) + (fun1 Observable.int bool)) + (fun (l,Fun (_,f),Fun (_,p)) -> + List.filter p (List.map f l) = List.map f (List.filter p l)) + + let fail_pred_strings = + Test.make ~name:"fail_pred_strings" ~count:100 + (fun1 Observable.string bool) + (fun (Fun (_,p)) -> not (p "some random string") || p "some other string") + + let int_gen = small_nat (* int *) + + (* Another example (false) property *) + let prop_foldleft_foldright = + Test.make ~name:"fold_left fold_right" ~count:1000 ~long_factor:20 + (triple + int_gen + (list int_gen) + (fun2 Observable.int Observable.int int_gen)) + (fun (z,xs,f) -> + let l1 = List.fold_right (Fn.apply f) xs z in + let l2 = List.fold_left (Fn.apply f) z xs in + if l1=l2 then true + else Test.fail_reportf "l=%s, fold_left=%s, fold_right=%s@." + (Print.(list int) xs) + (Print.int l1) + (Print.int l2) + ) + + (* Another example (false) property *) + let prop_foldleft_foldright_uncurry = + Test.make ~name:"fold_left fold_right uncurried" ~count:1000 ~long_factor:20 + (triple + (fun1 Observable.(pair int int) int_gen) + int_gen + (list int_gen)) + (fun (f,z,xs) -> + List.fold_right (fun x y -> Fn.apply f (x,y)) xs z = + List.fold_left (fun x y -> Fn.apply f (x,y)) z xs) + + (* Same as the above (false) property, but generating+shrinking functions last *) + let prop_foldleft_foldright_uncurry_funlast = + Test.make ~name:"fold_left fold_right uncurried fun last" ~count:1000 ~long_factor:20 + (triple + int_gen + (list int_gen) + (fun1 Observable.(pair int int) int_gen)) + (fun (z,xs,f) -> + List.fold_right (fun x y -> Fn.apply f (x,y)) xs z = + List.fold_left (fun x y -> Fn.apply f (x,y)) z xs) + + (* test from issue #64 *) + let fold_left_test = + Test.make ~name:"false fold, fun first" + (quad (* string -> int -> string *) + (fun2 Observable.string Observable.int small_string) + small_string + (list small_int) + (list small_int)) + (fun (f,acc,is,js) -> + let f = Fn.apply f in + List.fold_left f acc (is @ js) + = List.fold_left f (List.fold_left f acc is) is) (*Typo*) +end + +(* tests of (inner) find_example(_gen) behaviour *) +module FindExample = struct + open QCheck + + let find_ex = + Test.make ~name:"find_example" (2--50) + (fun n -> + let st = Random.State.make [| 0 |] in + let f m = n < m && m < 2 * n in + try + let m = find_example_gen ~rand:st ~count:100_000 ~f Gen.(0 -- 1000) in + f m + with No_example_found _ -> false) + + let find_ex_uncaught_issue_99_1_fail = + let rs = make (find_example ~count:10 ~f:(fun _ -> false) Gen.int) in + Test.make ~name:"FAIL_#99_1" rs (fun _ -> true) + + let find_ex_uncaught_issue_99_2_succeed = + Test.make ~name:"should_succeed_#99_2" ~count:10 + int (fun i -> i <= max_int) +end + +(* tests of statistics and histogram display *) +module Stats = struct + open QCheck + + let bool_dist = + Test.make ~name:"bool dist" ~count:500_000 (set_collect Bool.to_string bool) (fun _ -> true) + + let char_dist = + Test.make ~name:"char code dist" ~count:500_000 (add_stat ("char code", Char.code) char) (fun _ -> true) + + let string_len_tests = + let len = ("len",String.length) in + [ + Test.make ~name:"string_size len dist" ~count:5_000 (add_stat len (string_of_size (Gen.int_range 5 10))) (fun _ -> true); + Test.make ~name:"string len dist" ~count:5_000 (add_stat len string) (fun _ -> true); + Test.make ~name:"string_of len dist" ~count:5_000 (add_stat len (string_gen (Gen.return 'a'))) (fun _ -> true); + Test.make ~name:"printable_string len dist" ~count:5_000 (add_stat len printable_string) (fun _ -> true); + Test.make ~name:"small_string len dist" ~count:5_000 (add_stat len small_string) (fun _ -> true); + ] + + let list_len_tests = + let len = ("len",List.length) in + [ (* test from issue #30 *) + Test.make ~name:"list len dist" ~count:5_000 (add_stat len (list int)) (fun _ -> true); + Test.make ~name:"small_list len dist" ~count:5_000 (add_stat len (small_list int)) (fun _ -> true); + Test.make ~name:"list_of_size len dist" ~count:5_000 (add_stat len (list_of_size (Gen.int_range 5 10) int)) (fun _ -> true); + Test.make ~name:"list_repeat len dist" ~count:5_000 (add_stat len (make Gen.(list_repeat 42 int))) (fun _ -> true); + ] + + let array_len_tests = + let len = ("len",Array.length) in + [ + Test.make ~name:"array len dist" ~count:5_000 (add_stat len (array int)) (fun _ -> true); + Test.make ~name:"small_array len dist" ~count:5_000 (add_stat len (make Gen.(small_array int))) (fun _ -> true); + Test.make ~name:"array_of_size len dist" ~count:5_000 (add_stat len (array_of_size (Gen.int_range 5 10) int)) (fun _ -> true); + Test.make ~name:"array_repeat len dist" ~count:5_000 (add_stat len (make Gen.(array_repeat 42 int))) (fun _ -> true); + ] + + let int_dist_tests = + let dist = ("dist",fun x -> x) in + [ (* test from issue #40 *) + Test.make ~name:"int_stats_neg" ~count:5000 (add_stat dist small_signed_int) (fun _ -> true); + (* distribution tests from PR #45 *) + Test.make ~name:"small_signed_int dist" ~count:1000 (add_stat dist small_signed_int) (fun _ -> true); + Test.make ~name:"small_nat dist" ~count:1000 (add_stat dist small_nat) (fun _ -> true); + Test.make ~name:"nat dist" ~count:1000 (add_stat dist (make Gen.nat)) (fun _ -> true); + Test.make ~name:"int_range (-43643) 435434 dist" ~count:1000 (add_stat dist (int_range (-43643) 435434)) (fun _ -> true); + Test.make ~name:"int_range (-40000) 40000 dist" ~count:1000 (add_stat dist (int_range (-40000) 40000)) (fun _ -> true); + Test.make ~name:"int_range (-4) 4 dist" ~count:1000 (add_stat dist (int_range (-4) 4)) (fun _ -> true); + Test.make ~name:"int_range (-4) 17 dist" ~count:1000 (add_stat dist (int_range (-4) 17)) (fun _ -> true); + Test.make ~name:"int dist" ~count:100000 (add_stat dist int) (fun _ -> true); + Test.make ~name:"oneof int dist" ~count:1000 (add_stat dist (oneofl[min_int;-1;0;1;max_int])) (fun _ -> true); + ] + + let int_dist_empty_bucket = + Test.make ~name:"int_dist_empty_bucket" ~count:1_000 + (add_stat ("dist",fun x -> x) (oneof [small_int_corners ();int])) (fun _ -> true) +end + +(* Calling runners *) + +let () = QCheck_base_runner.set_seed 1234 +let _ = + QCheck_base_runner.run_tests ~colors:false ([ + Overall.passing; + Overall.failing; + Overall.error; + Overall.collect; + Overall.stats; + Overall.bad_assume_warn; + Overall.bad_assume_fail; + Generator.char_dist_issue_23; + Generator.char_test; + Generator.nat_test; + Generator.string_test; + Generator.list_test; + Generator.list_repeat_test; + Generator.array_repeat_test; + (*Shrink.test_fac_issue59;*) + Shrink.big_bound_issue59; + Shrink.long_shrink; + Shrink.ints_arent_0_mod_3; + Shrink.ints_are_0; + Shrink.ints_smaller_209609; + Shrink.nats_smaller_5001; + Shrink.char_is_never_abcdef; + Shrink.strings_are_empty; + Shrink.string_never_has_000_char; + Shrink.string_never_has_255_char; + Shrink.lists_are_empty_issue_64; + Shrink.list_shorter_10; + Shrink.list_shorter_432; + Shrink.list_shorter_4332; + Shrink.list_equal_dupl; + Shrink.list_unique_elems; + Function.fail_pred_map_commute; + Function.fail_pred_strings; + Function.prop_foldleft_foldright; + Function.prop_foldleft_foldright_uncurry; + Function.prop_foldleft_foldright_uncurry_funlast; + Function.fold_left_test; + FindExample.find_ex; + FindExample.find_ex_uncaught_issue_99_1_fail; + FindExample.find_ex_uncaught_issue_99_2_succeed; + Stats.bool_dist; + Stats.char_dist] + @ Stats.string_len_tests + @ Stats.list_len_tests + @ Stats.array_len_tests + @ Stats.int_dist_tests) + +let () = QCheck_base_runner.set_seed 153870556 +let _ = QCheck_base_runner.run_tests ~colors:false [Stats.int_dist_empty_bucket] diff --git a/test/core/dune b/test/core/dune index 40e59e0c..4f4ee0e6 100644 --- a/test/core/dune +++ b/test/core/dune @@ -1,4 +1,44 @@ + (test - (name test) - (package qcheck-core) - (libraries qcheck-core alcotest)) + (name test) + (modules test) + (libraries qcheck-core alcotest)) + +(executables + (names QCheck_expect_test QCheck2_expect_test) + (modules QCheck_expect_test QCheck2_expect_test) + (libraries qcheck-core qcheck-core.runner)) + +;; rules for QCheck_expect_test +(rule + (targets qcheck_output.txt) + (deps ./QCheck_expect_test.exe) + (package qcheck-core) + (enabled_if (= %{os_type} "Unix")) + (action + (with-stdout-to + %{targets} + (run ./QCheck_expect_test.exe --no-colors)))) + +(rule + (alias runtest) + (package qcheck-core) + (enabled_if (= %{os_type} "Unix")) + (action (diff qcheck_output.txt.expected qcheck_output.txt))) + +;; rules for QCheck2_expect_test +(rule + (targets qcheck2_output.txt) + (deps ./QCheck2_expect_test.exe) + (package qcheck-core) + (enabled_if (= %{os_type} "Unix")) + (action + (with-stdout-to + %{targets} + (run ./QCheck2_expect_test.exe --no-colors)))) + +(rule + (alias runtest) + (package qcheck-core) + (enabled_if (= %{os_type} "Unix")) + (action (diff qcheck2_output.txt.expected qcheck2_output.txt))) diff --git a/test/core/qcheck2_output.txt.expected b/test/core/qcheck2_output.txt.expected new file mode 100644 index 00000000..f13574bf --- /dev/null +++ b/test/core/qcheck2_output.txt.expected @@ -0,0 +1,943 @@ +random seed: 1234 +1571754099758104554 +0 +785877049879052277 +0 +392938524939526138 +0 +196469262469763069 +0 +98234631234881534 +0 +49117315617440767 +0 +24558657808720383 +0 +12279328904360191 +0 +6139664452180095 +0 +3069832226090047 +0 +1534916113045023 +0 +767458056522511 +0 +383729028261255 +0 +191864514130627 +0 +95932257065313 +0 +47966128532656 +0 +23983064266328 +0 +11991532133164 +0 +5995766066582 +0 +2997883033291 +0 +1498941516645 +0 +749470758322 +0 +374735379161 +0 +187367689580 +0 +93683844790 +0 +46841922395 +0 +23420961197 +0 +11710480598 +0 +5855240299 +0 +2927620149 +0 +1463810074 +0 +731905037 +0 +365952518 +0 +182976259 +0 +91488129 +0 +45744064 +0 +22872032 +0 +11436016 +0 +5718008 +0 +2859004 +0 +1429502 +0 +714751 +0 +357375 +0 +178687 +0 +89343 +0 +44671 +0 +22335 +0 +11167 +0 +5583 +0 +2791 +0 +1395 +0 +697 +0 +348 +0 +174 +0 +87 +0 +43 +0 +21 +0 +10 +0 +5 +0 +2 +0 +1 +0 +[7; 1; 42; 1; 8; 5; 3; 9; 5; 38; 3; 3; 0; 1; 98; 1; 4; 13; 9; 2; 6; 9; 47; 6; 5; 8; 8; 6; 0; 9; 7; 2; 8; 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 93; 5; 3; 0; 80; 1; 7; 7; 8; 8; 5; 7; 8; 9; 24; 4; 25; 8; 8; 5; 4; 90; 4; 6; 8; 4; 4; 0; 60; 8; 9; 7; 44; 5; 1; 2; 9; 74; 7; 7] +[] +[9; 61; 8; 4; 69; 2; 0; 72; 4; 41; 3; 8; 75; 83; 7; 7; 3; 9; 5; 8; 4; 1; 0; 2; 1; 4; 7; 6; 2; 1; 4; 86; 3; 79; 7; 86; 52; 39; 19; 0; 4; 7; 7; 7; 0; 4; 8; 8; 0; 5; 13; 1; 5; 0; 7; 12; 64; 34; 1; 1; 85; 8; 2; 9; 76; 0; 2; 5; 76; 69; 8; 8; 0; 1; 2; 2; 4; 60; 29; 5; 9; 4; 0; 8; 3; 3; 5; 1; 35; 8; 2; 7; 23; 61; 56; 8; 1; 1; 78; 7; 5; 0; 30; 9; 3; 7; 28; 57; 98; 3; 52; 3; 82; 7; 5; 5; 6; 8; 1; 6; 8; 9; 8; 16; 0] +[] +[1; 9; 8; 28; 47; 8; 5; 6; 8; 9; 2; 5; 8; 30; 6; 8; 84; 0; 6; 7; 76; 7; 9; 1; 0; 5; 76; 95; 2; 2; 1; 45; 7; 8; 8; 1; 6; 37; 5; 6; 73; 8; 0; 85; 8; 0; 4; 5; 2; 0; 26; 59; 0; 5; 13; 4; 7; 3; 6; 8; 1; 3] +[] +[5; 0; 0; 4; 10; 2; 4; 9; 5; 73; 6; 1; 5; 5; 3; 10; 5; 31; 1; 4; 3; 8; 9; 13; 41; 20; 96; 5; 1; 2; 8] +[] +[9; 8; 73; 5; 8; 2; 1; 8; 2; 6; 4; 18; 5; 76; 3] +[] +[0; 6; 2; 8; 8; 1; 4] +[] +[5; 2; 3] +[3; 2; 7; 3; 3] +[] +[5; 3] +[5; 3; 2] +[9; 87; 7; 0] +[0; 2; 7; 3; 3] +[0; 0; 7; 3; 3] +[0; 0; 0; 3; 3] +[0; 0; 0; 0; 3] +[0; 0; 0; 0; 0] + +--- Failure -------------------------------------------------------------------- + +Test should_fail_sort_id failed (9 shrink steps): + +[1; 0] + +=== Error ====================================================================== + +Test should_error_raise_exn errored on (1 shrink steps): + +0 + +exception Dune__exe__QCheck2_expect_test.Overall.Error + + ++++ Collect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Collect results for test collect_results: + +4: 20 cases +3: 25 cases +2: 17 cases +1: 18 cases +0: 20 cases + ++++ Stats for with_stats ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats mod4: + num: 100, avg: 1.68, stddev: 1.09, median 2, min 0, max 3 + 0: ############################## 17 + 1: ################################################### 29 + 2: ######################################## 23 + 3: ####################################################### 31 + +stats num: + num: 100, avg: 66.84, stddev: 31.94, median 65, min 2, max 120 + 2.. 7: ################## 3 + 8.. 13: ################## 3 + 14.. 19: 0 + 20.. 25: ########################################## 7 + 26.. 31: ######################## 4 + 32.. 37: ######################## 4 + 38.. 43: ################## 3 + 44.. 49: ################################################ 8 + 50.. 55: #################################### 6 + 56.. 61: #################################### 6 + 62.. 67: ####################################################### 9 + 68.. 73: ########################################## 7 + 74.. 79: ######################## 4 + 80.. 85: ################## 3 + 86.. 91: ############ 2 + 92.. 97: ########################################## 7 + 98..103: #################################### 6 + 104..109: #################################### 6 + 110..115: ####################################################### 9 + 116..121: ################## 3 + +!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Warning for test WARN_unlikely_precond: + +WARNING: only 0.7% tests (of 2000) passed precondition for "WARN_unlikely_precond" + +NOTE: it is likely that the precondition is too strong, or that the generator is buggy. + +--- Failure -------------------------------------------------------------------- + +Test FAIL_unlikely_precond failed: + +ERROR: only 0.7% tests (of 2000) passed precondition for "FAIL_unlikely_precond" + +NOTE: it is likely that the precondition is too strong, or that the generator is buggy. + + +--- Failure -------------------------------------------------------------------- + +Test char never produces '\255' failed (0 shrink steps): + +'\255' + +--- Failure -------------------------------------------------------------------- + +Test big bound issue59 failed (0 shrink steps): + +4611686018427387903 + +--- Failure -------------------------------------------------------------------- + +Test long_shrink failed (3040 shrink steps): + +([0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0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 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 1]) + +--- Failure -------------------------------------------------------------------- + +Test ints arent 0 mod 3 failed (1 shrink steps): + +0 + +--- Failure -------------------------------------------------------------------- + +Test ints are 0 failed (60 shrink steps): + +1 + +--- Failure -------------------------------------------------------------------- + +Test ints < 209609 failed (0 shrink steps): + +4611686018427387903 + +--- Failure -------------------------------------------------------------------- + +Test nat < 5001 failed (7 shrink steps): + +5001 + +--- Failure -------------------------------------------------------------------- + +Test char is never produces 'abcdef' failed (1 shrink steps): + +'a' + +--- Failure -------------------------------------------------------------------- + +Test strings are empty failed (8 shrink steps): + +"a" + +--- Failure -------------------------------------------------------------------- + +Test string never has a \000 char failed (22 shrink steps): + +"aaaaaa\000aaaaaaaaaaaaaaaa" + +--- Failure -------------------------------------------------------------------- + +Test string never has a \255 char failed (59 shrink steps): + +"aaaaaaaaaaaaaaaaaaaaaaaaaa\255aaaaaaaaaaaaaaaaaaaaaaaa" + +--- Failure -------------------------------------------------------------------- + +Test lists are empty failed (8 shrink steps): + +[0] + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 10 failed (16 shrink steps): + +[0; 0; 0; 0; 0; 0; 0; 0; 0; 0] + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 432 failed: + +ERROR: uncaught exception in generator for test lists shorter than 432 after 100 steps: +Exception: Stack overflow +Backtrace: + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 4332 failed: + +ERROR: uncaught exception in generator for test lists shorter than 4332 after 100 steps: +Exception: Stack overflow +Backtrace: + +--- Failure -------------------------------------------------------------------- + +Test lists equal to duplication failed: + +ERROR: uncaught exception in generator for test lists equal to duplication after 100 steps: +Exception: Stack overflow +Backtrace: + +--- Failure -------------------------------------------------------------------- + +Test lists have unique elems failed (11 shrink steps): + +[0; 0; 0; 0; 0] + +--- Failure -------------------------------------------------------------------- + +Test fail_pred_map_commute failed (16 shrink steps): + +([2], {_ -> 0}, {1 -> false; 2 -> true; _ -> false}) + +--- Failure -------------------------------------------------------------------- + +Test fail_pred_strings failed (1 shrink steps): + +{"some random string" -> true; _ -> false} + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right failed (22 shrink steps): + +(0, [1], {(1, 0) -> 1; (8, 0) -> 0; (8, 8) -> 0; (8, 93) -> 0; (7, 7) -> 0; (24, 5) -> 0; (7, 0) -> 0; (0, 2) -> 0; (2, 4) -> 0; (9, 8) -> 0; (4, 9) -> 0; (1, 24) -> 0; (9, 5) -> 0; (80, 9) -> 0; (24, 0) -> 0; (1, 8) -> 0; (5, 7) -> 0; (0, 7) -> 0; (7, 8) -> 0; (0, 24) -> 0; _ -> 0}) + ++++ Messages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Messages for test fold_left fold_right: + +l=[1], fold_left=1, fold_right=0 + + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right uncurried failed (325 shrink steps): + +({(23, 62) -> 0; (9, 42) -> 0; (8, 61) -> 0; (8, 5) -> 0; (30, 5) -> 0; (9, 6) -> 0; (76, 6) -> 0; (19, 31) -> 0; (7, 62) -> 0; (0, 7) -> 1; (7, 1) -> 0; (78, 4) -> 0; (8, 2) -> 0; (78, 0) -> 0; (3, 47) -> 0; (4, 8) -> 0; (98, 9) -> 0; (1, 38) -> 0; (0, 26) -> 0; (1, 7) -> 0; (86, 3) -> 0; (9, 37) -> 0; (8, 1) -> 0; (79, 9) -> 0; (3, 5) -> 0; (56, 8) -> 0; (2, 5) -> 0; (8, 8) -> 0; (56, 67) -> 0; (5, 60) -> 0; (2, 31) -> 0; (61, 6) -> 0; (12, 5) -> 0; (76, 2) -> 0; (78, 8) -> 0; (1, 1) -> 0; (8, 9) -> 0; (7, 8) -> 0; (2, 9) -> 0; (29, 7) -> 0; (5, 8) -> 0; (28, 6) -> 0; (1, 4) -> 0; (9, 79) -> 0; (0, 1) -> 0; (1, 41) -> 0; (82, 98) -> 0; (6, 79) -> 0; (7, 6) -> 0; (4, 3) -> 0; (8, 12) -> 0; (5, 1) -> 0; (39, 1) -> 0; (3, 6) -> 0; (1, 2) -> 0; (76, 31) -> 0; (4, 1) -> 0; (6, 5) -> 0; (0, 8) -> 0; (8, 7) -> 0; (2, 6) -> 0; (52, 5) -> 0; (8, 47) -> 0; (5, 3) -> 0; (7, 9) -> 0; (13, 13) -> 0; (0, 87) -> 0; (82, 0) -> 0; (34, 8) -> 0; (1, 14) -> 0; (2, 71) -> 0; (52, 4) -> 0; (1, 3) -> 0; (85, 6) -> 0; (8, 19) -> 0; (3, 13) -> 0; (69, 1) -> 0; (5, 62) -> 0; (0, 15) -> 0; (34, 0) -> 0; (9, 4) -> 0; (0, 6) -> 0; (1, 8) -> 0; (86, 6) -> 0; (4, 5) -> 0; (3, 1) -> 0; (57, 2) -> 0; (3, 3) -> 0; (4, 0) -> 0; (30, 6) -> 0; (5, 34) -> 0; (0, 4) -> 0; (2, 3) -> 0; (5, 6) -> 0; (5, 7) -> 0; (5, 0) -> 0; (4, 4) -> 0; (7, 5) -> 0; (78, 2) -> 0; (9, 8) -> 0; (7, 70) -> 0; (35, 1) -> 0; (64, 7) -> 0; (60, 0) -> 0; (1, 9) -> 0; _ -> 0}, 0, [0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 0; 7]) + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right uncurried fun last failed (25 shrink steps): + +(0, [1], {(0, 2) -> 0; (8, 80) -> 0; (93, 9) -> 0; (7, 24) -> 0; (8, 0) -> 0; (9, 7) -> 0; (0, 24) -> 0; (0, 7) -> 0; (7, 1) -> 0; (8, 9) -> 0; (24, 0) -> 0; (5, 8) -> 0; (1, 0) -> 1; (4, 8) -> 0; (7, 0) -> 0; (5, 7) -> 0; (8, 4) -> 0; (24, 5) -> 0; (0, 1) -> 0; (2, 8) -> 0; (9, 1) -> 0; (8, 8) -> 0; _ -> 0}) + +--- Failure -------------------------------------------------------------------- + +Test fold_left test, fun first failed (15 shrink steps): + +({_ -> ""}, "a", [], [0]) + +--- Failure -------------------------------------------------------------------- + +Test FAIL_#99_1 failed: + +ERROR: uncaught exception in generator for test FAIL_#99_1 after 100 steps: +Exception: QCheck2.No_example_found("") +Backtrace: + ++++ Collect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Collect results for test bool dist: + +true: 250134 cases +false: 249866 cases + ++++ Stats for char code dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats char code: + num: 500000, avg: 127.42, stddev: 73.92, median 127, min 0, max 255 + 0.. 12: ###################################################### 25509 + 13.. 25: ###################################################### 25398 + 26.. 38: ###################################################### 25293 + 39.. 51: ###################################################### 25448 + 52.. 64: ###################################################### 25392 + 65.. 77: ####################################################### 25660 + 78.. 90: ###################################################### 25462 + 91..103: ###################################################### 25331 + 104..116: ##################################################### 25129 + 117..129: ###################################################### 25351 + 130..142: ###################################################### 25492 + 143..155: ###################################################### 25370 + 156..168: ###################################################### 25658 + 169..181: ###################################################### 25400 + 182..194: ##################################################### 25167 + 195..207: ###################################################### 25338 + 208..220: ##################################################### 25181 + 221..233: ##################################################### 25145 + 234..246: ###################################################### 25567 + 247..259: ##################################### 17709 + ++++ Stats for string_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.70, median 7, min 5, max 10 + 5: ##################################################### 837 + 6: ##################################################### 826 + 7: ###################################################### 843 + 8: ####################################################### 855 + 9: #################################################### 813 + 10: ##################################################### 826 + ++++ Stats for string len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 384.53, stddev: 1330.61, median 9, min 0, max 9969 + 0.. 498: ####################################################### 4246 + 499.. 997: ###### 518 + 998..1496: 21 + 1497..1995: 10 + 1996..2494: 11 + 2495..2993: 10 + 2994..3492: 13 + 3493..3991: 13 + 3992..4490: 5 + 4491..4989: 10 + 4990..5488: 19 + 5489..5987: 9 + 5988..6486: 10 + 6487..6985: 12 + 6986..7484: 17 + 7485..7983: 16 + 7984..8482: 16 + 8483..8981: 16 + 8982..9480: 16 + 9481..9979: 12 + ++++ Stats for string_of len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 363.14, stddev: 1245.80, median 9, min 0, max 9986 + 0.. 499: ####################################################### 4270 + 500.. 999: ###### 493 + 1000.. 1499: 16 + 1500.. 1999: 11 + 2000.. 2499: 15 + 2500.. 2999: 17 + 3000.. 3499: 11 + 3500.. 3999: 19 + 4000.. 4499: 14 + 4500.. 4999: 10 + 5000.. 5499: 16 + 5500.. 5999: 11 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 12 + 7500.. 7999: 16 + 8000.. 8499: 11 + 8500.. 8999: 4 + 9000.. 9499: 13 + 9500.. 9999: 13 + ++++ Stats for string_readable len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 384.53, stddev: 1330.61, median 9, min 0, max 9969 + 0.. 498: ####################################################### 4246 + 499.. 997: ###### 518 + 998..1496: 21 + 1497..1995: 10 + 1996..2494: 11 + 2495..2993: 10 + 2994..3492: 13 + 3493..3991: 13 + 3992..4490: 5 + 4491..4989: 10 + 4990..5488: 19 + 5489..5987: 9 + 5988..6486: 10 + 6487..6985: 12 + 6986..7484: 17 + 7485..7983: 16 + 7984..8482: 16 + 8483..8981: 16 + 8982..9480: 16 + 9481..9979: 12 + ++++ Stats for small_string len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 15.57, stddev: 24.36, median 6, min 0, max 99 + 0.. 4: #################################################### 1925 + 5.. 9: ####################################################### 2005 + 10.. 14: # 52 + 15.. 19: # 50 + 20.. 24: # 55 + 25.. 29: # 56 + 30.. 34: # 55 + 35.. 39: # 49 + 40.. 44: # 65 + 45.. 49: # 65 + 50.. 54: # 55 + 55.. 59: # 68 + 60.. 64: # 61 + 65.. 69: # 65 + 70.. 74: # 57 + 75.. 79: # 66 + 80.. 84: # 65 + 85.. 89: # 64 + 90.. 94: # 60 + 95.. 99: # 62 + ++++ Stats for list len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 400.16, stddev: 1371.90, median 9, min 0, max 9987 + 0.. 499: ####################################################### 4246 + 500.. 999: ###### 502 + 1000.. 1499: 13 + 1500.. 1999: 10 + 2000.. 2499: 14 + 2500.. 2999: 14 + 3000.. 3499: 20 + 3500.. 3999: 7 + 4000.. 4499: 13 + 4500.. 4999: 16 + 5000.. 5499: 12 + 5500.. 5999: 15 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 16 + 7500.. 7999: 12 + 8000.. 8499: 11 + 8500.. 8999: 16 + 9000.. 9499: 15 + 9500.. 9999: 20 + ++++ Stats for small_list len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 16.14, stddev: 24.86, median 6, min 0, max 99 + 0.. 4: ###################################################### 1923 + 5.. 9: ####################################################### 1936 + 10.. 14: # 61 + 15.. 19: # 59 + 20.. 24: # 62 + 25.. 29: # 70 + 30.. 34: # 61 + 35.. 39: # 64 + 40.. 44: # 64 + 45.. 49: # 56 + 50.. 54: # 65 + 55.. 59: # 55 + 60.. 64: # 60 + 65.. 69: # 62 + 70.. 74: # 57 + 75.. 79: # 69 + 80.. 84: ## 73 + 85.. 89: # 67 + 90.. 94: # 62 + 95.. 99: ## 74 + ++++ Stats for list_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.71, median 8, min 5, max 10 + 5: ####################################################### 867 + 6: ################################################### 813 + 7: ################################################### 815 + 8: #################################################### 833 + 9: ###################################################### 857 + 10: ################################################### 815 + ++++ Stats for list_repeat len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 42.00, stddev: 0.00, median 42, min 42, max 42 + 42: ####################################################### 5000 + ++++ Stats for array len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 400.16, stddev: 1371.90, median 9, min 0, max 9987 + 0.. 499: ####################################################### 4246 + 500.. 999: ###### 502 + 1000.. 1499: 13 + 1500.. 1999: 10 + 2000.. 2499: 14 + 2500.. 2999: 14 + 3000.. 3499: 20 + 3500.. 3999: 7 + 4000.. 4499: 13 + 4500.. 4999: 16 + 5000.. 5499: 12 + 5500.. 5999: 15 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 16 + 7500.. 7999: 12 + 8000.. 8499: 11 + 8500.. 8999: 16 + 9000.. 9499: 15 + 9500.. 9999: 20 + ++++ Stats for small_array len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 16.14, stddev: 24.86, median 6, min 0, max 99 + 0.. 4: ###################################################### 1923 + 5.. 9: ####################################################### 1936 + 10.. 14: # 61 + 15.. 19: # 59 + 20.. 24: # 62 + 25.. 29: # 70 + 30.. 34: # 61 + 35.. 39: # 64 + 40.. 44: # 64 + 45.. 49: # 56 + 50.. 54: # 65 + 55.. 59: # 55 + 60.. 64: # 60 + 65.. 69: # 62 + 70.. 74: # 57 + 75.. 79: # 69 + 80.. 84: ## 73 + 85.. 89: # 67 + 90.. 94: # 62 + 95.. 99: ## 74 + ++++ Stats for array_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.71, median 8, min 5, max 10 + 5: ####################################################### 867 + 6: ################################################### 813 + 7: ################################################### 815 + 8: #################################################### 833 + 9: ###################################################### 857 + 10: ################################################### 815 + ++++ Stats for array_repeat len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 42.00, stddev: 0.00, median 42, min 42, max 42 + 42: ####################################################### 5000 + ++++ Stats for int_stats_neg ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 5000, avg: 0.17, stddev: 29.68, median 0, min -99, max 99 + -99..-90: # 65 + -89..-80: # 63 + -79..-70: # 64 + -69..-60: # 58 + -59..-50: # 67 + -49..-40: # 72 + -39..-30: # 61 + -29..-20: # 61 + -19..-10: # 67 + -9.. 0: ####################################################### 2076 + 1.. 10: ############################################## 1764 + 11.. 20: # 66 + 21.. 30: # 64 + 31.. 40: # 64 + 41.. 50: # 67 + 51.. 60: # 60 + 61.. 70: # 75 + 71.. 80: # 60 + 81.. 90: # 60 + 91..100: # 66 + ++++ Stats for small_signed_int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 0.90, stddev: 28.23, median 0, min -99, max 99 + -99..-90: # 12 + -89..-80: # 11 + -79..-70: # 9 + -69..-60: 6 + -59..-50: # 11 + -49..-40: # 13 + -39..-30: # 9 + -29..-20: # 13 + -19..-10: 8 + -9.. 0: ####################################################### 453 + 1.. 10: ######################################### 340 + 11.. 20: # 15 + 21.. 30: # 11 + 31.. 40: # 12 + 41.. 50: # 13 + 51.. 60: # 13 + 61.. 70: # 16 + 71.. 80: # 9 + 81.. 90: # 16 + 91..100: # 10 + ++++ Stats for small_nat dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 15.11, stddev: 23.27, median 6, min 0, max 99 + 0.. 4: #################################################### 377 + 5.. 9: ####################################################### 392 + 10.. 14: ## 20 + 15.. 19: ## 15 + 20.. 24: # 11 + 25.. 29: ## 17 + 30.. 34: ## 19 + 35.. 39: ## 17 + 40.. 44: # 10 + 45.. 49: # 9 + 50.. 54: # 8 + 55.. 59: # 9 + 60.. 64: ## 15 + 65.. 69: # 10 + 70.. 74: # 13 + 75.. 79: ## 19 + 80.. 84: # 11 + 85.. 89: # 13 + 90.. 94: 5 + 95.. 99: # 10 + ++++ Stats for nat dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 363.02, stddev: 1215.04, median 9, min 0, max 9476 + 0.. 473: ####################################################### 847 + 474.. 947: ###### 95 + 948..1421: 14 + 1422..1895: 3 + 1896..2369: 0 + 2370..2843: 3 + 2844..3317: 2 + 3318..3791: 3 + 3792..4265: 2 + 4266..4739: 4 + 4740..5213: 3 + 5214..5687: 4 + 5688..6161: 3 + 6162..6635: 4 + 6636..7109: 1 + 7110..7583: 4 + 7584..8057: 2 + 8058..8531: 1 + 8532..9005: 1 + 9006..9479: 4 + ++++ Stats for int_range (-43643) 435434 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 195335.64, stddev: 136803.99, median 195583, min -43624, max 435210 + -43624..-19683: ############################################ 52 + -19682.. 4259: ######################################## 47 + 4260.. 28201: ############################## 36 + 28202.. 52143: ############################################ 52 + 52144.. 76085: ########################################## 50 + 76086..100027: ####################################################### 64 + 100028..123969: ############################################### 55 + 123970..147911: ######################################## 47 + 147912..171853: ############################################## 54 + 171854..195795: #################################### 43 + 195796..219737: ############################################## 54 + 219738..243679: ########################################### 51 + 243680..267621: ################################################ 57 + 267622..291563: ########################################## 49 + 291564..315505: #################################### 42 + 315506..339447: ###################################### 45 + 339448..363389: ################################################ 57 + 363390..387331: ###################################### 45 + 387332..411273: ########################################## 49 + 411274..435215: ########################################### 51 + ++++ Stats for int_range (-40000) 40000 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: -173.78, stddev: 23042.92, median 180, min -39859, max 39942 + -39859..-35869: ############################################# 56 + -35868..-31878: ################################### 43 + -31877..-27887: ################################################# 60 + -27886..-23896: ##################################### 46 + -23895..-19905: ######################################## 49 + -19904..-15914: #################################### 45 + -15913..-11923: ############################################ 54 + -11922.. -7932: ############################################### 58 + -7931.. -3941: ######################################### 51 + -3940.. 50: ############################ 35 + 51.. 4041: ####################################### 48 + 4042.. 8032: ########################################## 52 + 8033.. 12023: ######################################### 51 + 12024.. 16014: ########################################### 53 + 16015.. 20005: ############################################ 54 + 20006.. 23996: ################################## 42 + 23997.. 27987: ####################################################### 67 + 27988.. 31978: ################################ 40 + 31979.. 35969: ######################################### 51 + 35970.. 39960: #################################### 45 + ++++ Stats for int_range (-4) 4 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 0.02, stddev: 2.55, median 0, min -4, max 4 + -4: ############################################ 99 + -3: ##################################################### 118 + -2: ################################################## 111 + -1: ################################################## 113 + 0: ################################################## 113 + 1: ##################################################### 118 + 2: ############################################# 102 + 3: ####################################################### 122 + 4: ############################################## 104 + ++++ Stats for int_range (-4) 17 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 6.67, stddev: 6.39, median 7, min -4, max 17 + -4..-3: ############################################# 90 + -2..-1: ############################################# 91 + 0.. 1: ########################################## 84 + 2.. 3: ############################################## 92 + 4.. 5: ########################################### 87 + 6.. 7: ########################################### 86 + 8.. 9: ############################################ 89 + 10..11: ########################################### 87 + 12..13: ####################################################### 110 + 14..15: ############################################# 91 + 16..17: ############################################## 93 + 18..19: 0 + 20..21: 0 + 22..23: 0 + 24..25: 0 + 26..27: 0 + 28..29: 0 + 30..31: 0 + 32..33: 0 + 34..35: 0 + ++++ Stats for int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 100000, avg: 6126662802445055.00, stddev: 2661484817981980672.00, median 158655556399988, min -4611578348806740501, max 4611677827646819817 + -4611578348806740501..-4150415539984062486: #################################################### 4926 + -4150415539984062485..-3689252731161384470: #################################################### 4949 + -3689252731161384469..-3228089922338706454: ##################################################### 4957 + -3228089922338706453..-2766927113516028438: ##################################################### 4993 + -2766927113516028437..-2305764304693350422: ###################################################### 5043 + -2305764304693350421..-1844601495870672406: ##################################################### 5040 + -1844601495870672405..-1383438687047994390: ##################################################### 4974 + -1383438687047994389.. -922275878225316374: ##################################################### 5031 + -922275878225316373.. -461113069402638358: ####################################################### 5136 + -461113069402638357.. 49739420039658: ##################################################### 4950 + 49739420039659.. 461212548242717674: ###################################################### 5076 + 461212548242717675.. 922375357065395690: #################################################### 4933 + 922375357065395691.. 1383538165888073706: ##################################################### 4970 + 1383538165888073707.. 1844700974710751722: #################################################### 4922 + 1844700974710751723.. 2305863783533429738: ###################################################### 5087 + 2305863783533429739.. 2767026592356107754: #################################################### 4913 + 2767026592356107755.. 3228189401178785770: ##################################################### 4960 + 3228189401178785771.. 3689352210001463786: ##################################################### 5029 + 3689352210001463787.. 4150515018824141802: ###################################################### 5048 + 4150515018824141803.. 4611677827646819818: ###################################################### 5063 + ++++ Stats for oneof int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 4611686018427388.00, stddev: 2905870896563567616.00, median 0, min -4611686018427387904, max 4611686018427387903 + -4611686018427387904..-4150517416584649089: ################## 208 + -4150517416584649088..-3689348814741910273: 0 + -3689348814741910272..-3228180212899171457: 0 + -3228180212899171456..-2767011611056432641: 0 + -2767011611056432640..-2305843009213693825: 0 + -2305843009213693824..-1844674407370955009: 0 + -1844674407370955008..-1383505805528216193: 0 + -1383505805528216192.. -922337203685477377: 0 + -922337203685477376.. -461168601842738561: 0 + -461168601842738560.. 255: ####################################################### 603 + 256.. 461168601842739071: 0 + 461168601842739072.. 922337203685477887: 0 + 922337203685477888.. 1383505805528216703: 0 + 1383505805528216704.. 1844674407370955519: 0 + 1844674407370955520.. 2305843009213694335: 0 + 2305843009213694336.. 2767011611056433151: 0 + 2767011611056433152.. 3228180212899171967: 0 + 3228180212899171968.. 3689348814741910783: 0 + 3689348814741910784.. 4150517416584649599: 0 + 4150517416584649600.. 4611686018427387903: ################# 189 +================================================================================ +1 warning(s) +failure (26 tests failed, 1 tests errored, ran 64 tests) +random seed: 153870556 + ++++ Stats for int_dist_empty_bucket ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: -10119269408092442.00, stddev: 1871251663919905536.00, median 9, min -4576142151952919207, max 4611686018427387903 + -4576142151952919207..-4116750743433903848: ## 25 + -4116750743433903847..-3657359334914888488: ## 23 + -3657359334914888487..-3197967926395873128: ### 30 + -3197967926395873127..-2738576517876857768: ## 24 + -2738576517876857767..-2279185109357842408: ## 28 + -2279185109357842407..-1819793700838827048: ## 21 + -1819793700838827047..-1360402292319811688: # 19 + -1360402292319811687.. -901010883800796328: ## 27 + -901010883800796327.. -441619475281780968: ## 27 + -441619475281780967.. 17771933237234392: ####################################################### 540 + 17771933237234393.. 477163341756249752: ## 21 + 477163341756249753.. 936554750275265112: # 19 + 936554750275265113.. 1395946158794280472: ## 24 + 1395946158794280473.. 1855337567313295832: ## 27 + 1855337567313295833.. 2314728975832311192: ## 21 + 2314728975832311193.. 2774120384351326552: ## 23 + 2774120384351326553.. 3233511792870341912: ### 36 + 3233511792870341913.. 3692903201389357272: # 17 + 3692903201389357273.. 4152294609908372632: ## 21 + 4152294609908372633.. 4611686018427387903: ## 27 +================================================================================ +success (ran 1 tests) diff --git a/test/core/qcheck_output.txt.expected b/test/core/qcheck_output.txt.expected new file mode 100644 index 00000000..da58eda8 --- /dev/null +++ b/test/core/qcheck_output.txt.expected @@ -0,0 +1,874 @@ +random seed: 1234 +2724675603984413065 +1362337801992206533 +681168900996103267 +340584450498051634 +170292225249025817 +85146112624512909 +42573056312256455 +21286528156128228 +10643264078064114 +5321632039032057 +2660816019516029 +1330408009758015 +665204004879008 +332602002439504 +166301001219752 +83150500609876 +41575250304938 +20787625152469 +10393812576235 +5196906288118 +2598453144059 +1299226572030 +649613286015 +324806643008 +162403321504 +81201660752 +40600830376 +20300415188 +10150207594 +5075103797 +2537551899 +1268775950 +634387975 +317193988 +158596994 +79298497 +39649249 +19824625 +9912313 +4956157 +2478079 +1239040 +619520 +309760 +154880 +77440 +38720 +19360 +9680 +4840 +2420 +1210 +605 +303 +152 +76 +38 +19 +10 +5 +3 +2 +1 +0 +[7; 1; 42; 1; 8; 5; 3; 9; 5; 38; 3; 3; 0; 1; 98; 1; 4; 13; 9; 2; 6; 9; 47; 6; 5; 8; 8; 6; 0; 9; 7; 2; 8; 6; 62; 6; 4; 31; 19; 1; 41; 60; 6; 5; 8; 1; 1; 4; 7; 7; 0; 5; 5; 71; 14; 26; 47; 5; 1; 6; 34; 9; 4; 2; 37; 3; 8; 4; 31; 6; 2; 1; 0; 7; 5; 1; 0; 15; 6; 1; 8; 13; 0; 6; 2; 4; 2; 6; 6; 1; 4; 1; 9; 79; 0; 87; 6; 8; 8; 62; 1; 4; 62; 6; 31; 1; 5; 6; 5; 9; 3; 3; 1; 79; 4; 3; 2; 67; 5; 7; 12; 70; 8; 8; 6; 1; 3; 14; 15; 1; 61; 4; 1; 4; 1; 7; 4; 4; 4; 2; 8; 8; 7; 5; 4; 27; 0; 9; 80; 25; 1; 8; 1; 3; 7; 4; 3; 5; 5; 6; 5; 5; 31; 7; 0; 3; 3; 6; 71; 76; 28; 60; 6; 2; 6; 3; 0; 4; 1; 0; 5; 7; 0; 28; 86; 4; 7; 51; 36; 0; 5;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7; 44; 5; 1; 2; 9; 74; 7; 7] +[36; 0; 5; 0; 1; 4; 3; 6; 0; 1; 1; 8; 18; 4; 2; 8; 8; 1; 4; 7; 1; 0; 93; 5; 3; 0; 80; 1; 7; 7; 8; 8; 5; 7; 8; 9; 24; 4; 25; 8; 8; 5; 4; 90; 4; 6; 8; 4; 4; 0; 60; 8; 9; 7; 44; 5; 1; 2; 9; 74; 7; 7] +[8; 5; 7; 8; 9; 24; 4; 25; 8; 8; 5; 4; 90; 4; 6; 8; 4; 4; 0; 60; 8; 9; 7; 44; 5; 1; 2; 9; 74; 7; 7] +[4; 4; 0; 60; 8; 9; 7; 44; 5; 1; 2; 9; 74; 7; 7] +[5; 1; 2; 9; 74; 7; 7] +[74; 7; 7] +[7] +[74] +[7; 7] +[7] +[7] +[4; 7] +[6; 7] +[6; 7] +[7; 4] +[7; 6] +[7; 6] + +--- Failure -------------------------------------------------------------------- + +Test should_fail_sort_id failed (18 shrink steps): + +[1; 0] + +=== Error ====================================================================== + +Test should_error_raise_exn errored on (63 shrink steps): + +0 + +exception Dune__exe__QCheck_expect_test.Overall.Error + + ++++ Collect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Collect results for test collect_results: + +4: 20 cases +3: 25 cases +2: 17 cases +1: 18 cases +0: 20 cases + ++++ Stats for with_stats ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats mod4: + num: 100, avg: 1.68, stddev: 1.09, median 2, min 0, max 3 + 0: ############################## 17 + 1: ################################################### 29 + 2: ######################################## 23 + 3: ####################################################### 31 + +stats num: + num: 100, avg: 66.84, stddev: 31.94, median 65, min 2, max 120 + 2.. 7: ################## 3 + 8.. 13: ################## 3 + 14.. 19: 0 + 20.. 25: ########################################## 7 + 26.. 31: ######################## 4 + 32.. 37: ######################## 4 + 38.. 43: ################## 3 + 44.. 49: ################################################ 8 + 50.. 55: #################################### 6 + 56.. 61: #################################### 6 + 62.. 67: ####################################################### 9 + 68.. 73: ########################################## 7 + 74.. 79: ######################## 4 + 80.. 85: ################## 3 + 86.. 91: ############ 2 + 92.. 97: ########################################## 7 + 98..103: #################################### 6 + 104..109: #################################### 6 + 110..115: ####################################################### 9 + 116..121: ################## 3 + +!!! Warning !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +Warning for test WARN_unlikely_precond: + +WARNING: only 0.5% tests (of 2000) passed precondition for "WARN_unlikely_precond" + +NOTE: it is likely that the precondition is too strong, or that the generator is buggy. + +--- Failure -------------------------------------------------------------------- + +Test FAIL_unlikely_precond failed: + +ERROR: only 0.5% tests (of 2000) passed precondition for "FAIL_unlikely_precond" + +NOTE: it is likely that the precondition is too strong, or that the generator is buggy. + + +--- Failure -------------------------------------------------------------------- + +Test char never produces '\255' failed (0 shrink steps): + +'\255' + +--- Failure -------------------------------------------------------------------- + +Test big bound issue59 failed (52 shrink steps): + +209609 + +--- Failure -------------------------------------------------------------------- + +Test long_shrink failed (149 shrink steps): + +([0], [-1]) + +--- Failure -------------------------------------------------------------------- + +Test ints arent 0 mod 3 failed (84 shrink steps): + +-21 + +--- Failure -------------------------------------------------------------------- + +Test ints are 0 failed (62 shrink steps): + +1 + +--- Failure -------------------------------------------------------------------- + +Test ints < 209609 failed (52 shrink steps): + +209609 + +--- Failure -------------------------------------------------------------------- + +Test nat < 5001 failed (6 shrink steps): + +5001 + +--- Failure -------------------------------------------------------------------- + +Test char is never produces 'abcdef' failed (0 shrink steps): + +'d' + +--- Failure -------------------------------------------------------------------- + +Test strings are empty failed (249 shrink steps): + +"\177" + +--- Failure -------------------------------------------------------------------- + +Test string never has a \000 char failed (25 shrink steps): + +"\000" + +--- Failure -------------------------------------------------------------------- + +Test string never has a \255 char failed (249 shrink steps): + +"\255" + +--- Failure -------------------------------------------------------------------- + +Test lists are empty failed (11 shrink steps): + +[0] + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 10 failed (50 shrink steps): + +[0; 0; 0; 0; 0; 0; 0; 0; 0; 0] + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 432 failed (1696 shrink steps): + +[...] list length: 432 + +--- Failure -------------------------------------------------------------------- + +Test lists shorter than 4332 failed (13 shrink steps): + +[...] list length: 4332 + +--- Failure -------------------------------------------------------------------- + +Test lists equal to duplication failed (20 shrink steps): + +[...] list length: 1 + +--- Failure -------------------------------------------------------------------- + +Test lists have unique elems failed (7 shrink steps): + +[7; 7] + +--- Failure -------------------------------------------------------------------- + +Test fail_pred_map_commute failed (127 shrink steps): + +([3], {_ -> 0}, {3 -> false; _ -> true}) + +--- Failure -------------------------------------------------------------------- + +Test fail_pred_strings failed (1 shrink steps): + +{some random string -> true; _ -> false} + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right failed (25 shrink steps): + +(0, [1], {(1, 0) -> 1; _ -> 0}) + ++++ Messages ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Messages for test fold_left fold_right: + +l=[1], fold_left=1, fold_right=0 + + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right uncurried failed (111 shrink steps): + +({(5, 7) -> 0; _ -> 7}, 0, [5; 0]) + +--- Failure -------------------------------------------------------------------- + +Test fold_left fold_right uncurried fun last failed (26 shrink steps): + +(0, [1], {(0, 1) -> 1; _ -> 0}) + +--- Failure -------------------------------------------------------------------- + +Test false fold, fun first failed (40 shrink steps): + +({_ -> ""}, "z", [], [0]) + +--- Failure -------------------------------------------------------------------- + +Test FAIL_#99_1 failed: + +ERROR: uncaught exception in generator for test FAIL_#99_1 after 100 steps: +Exception: QCheck.No_example_found("") +Backtrace: + ++++ Collect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +Collect results for test bool dist: + +true: 250134 cases +false: 249866 cases + ++++ Stats for char code dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats char code: + num: 500000, avg: 127.42, stddev: 73.92, median 127, min 0, max 255 + 0.. 12: ###################################################### 25509 + 13.. 25: ###################################################### 25398 + 26.. 38: ###################################################### 25293 + 39.. 51: ###################################################### 25448 + 52.. 64: ###################################################### 25392 + 65.. 77: ####################################################### 25660 + 78.. 90: ###################################################### 25462 + 91..103: ###################################################### 25331 + 104..116: ##################################################### 25129 + 117..129: ###################################################### 25351 + 130..142: ###################################################### 25492 + 143..155: ###################################################### 25370 + 156..168: ###################################################### 25658 + 169..181: ###################################################### 25400 + 182..194: ##################################################### 25167 + 195..207: ###################################################### 25338 + 208..220: ##################################################### 25181 + 221..233: ##################################################### 25145 + 234..246: ###################################################### 25567 + 247..259: ##################################### 17709 + ++++ Stats for string_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.70, median 7, min 5, max 10 + 5: ##################################################### 837 + 6: ##################################################### 826 + 7: ###################################################### 843 + 8: ####################################################### 855 + 9: #################################################### 813 + 10: ##################################################### 826 + ++++ Stats for string len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 384.53, stddev: 1330.61, median 9, min 0, max 9969 + 0.. 498: ####################################################### 4246 + 499.. 997: ###### 518 + 998..1496: 21 + 1497..1995: 10 + 1996..2494: 11 + 2495..2993: 10 + 2994..3492: 13 + 3493..3991: 13 + 3992..4490: 5 + 4491..4989: 10 + 4990..5488: 19 + 5489..5987: 9 + 5988..6486: 10 + 6487..6985: 12 + 6986..7484: 17 + 7485..7983: 16 + 7984..8482: 16 + 8483..8981: 16 + 8982..9480: 16 + 9481..9979: 12 + ++++ Stats for string_of len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 363.14, stddev: 1245.80, median 9, min 0, max 9986 + 0.. 499: ####################################################### 4270 + 500.. 999: ###### 493 + 1000.. 1499: 16 + 1500.. 1999: 11 + 2000.. 2499: 15 + 2500.. 2999: 17 + 3000.. 3499: 11 + 3500.. 3999: 19 + 4000.. 4499: 14 + 4500.. 4999: 10 + 5000.. 5499: 16 + 5500.. 5999: 11 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 12 + 7500.. 7999: 16 + 8000.. 8499: 11 + 8500.. 8999: 4 + 9000.. 9499: 13 + 9500.. 9999: 13 + ++++ Stats for printable_string len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 384.53, stddev: 1330.61, median 9, min 0, max 9969 + 0.. 498: ####################################################### 4246 + 499.. 997: ###### 518 + 998..1496: 21 + 1497..1995: 10 + 1996..2494: 11 + 2495..2993: 10 + 2994..3492: 13 + 3493..3991: 13 + 3992..4490: 5 + 4491..4989: 10 + 4990..5488: 19 + 5489..5987: 9 + 5988..6486: 10 + 6487..6985: 12 + 6986..7484: 17 + 7485..7983: 16 + 7984..8482: 16 + 8483..8981: 16 + 8982..9480: 16 + 9481..9979: 12 + ++++ Stats for small_string len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 15.57, stddev: 24.36, median 6, min 0, max 99 + 0.. 4: #################################################### 1925 + 5.. 9: ####################################################### 2005 + 10.. 14: # 52 + 15.. 19: # 50 + 20.. 24: # 55 + 25.. 29: # 56 + 30.. 34: # 55 + 35.. 39: # 49 + 40.. 44: # 65 + 45.. 49: # 65 + 50.. 54: # 55 + 55.. 59: # 68 + 60.. 64: # 61 + 65.. 69: # 65 + 70.. 74: # 57 + 75.. 79: # 66 + 80.. 84: # 65 + 85.. 89: # 64 + 90.. 94: # 60 + 95.. 99: # 62 + ++++ Stats for list len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 400.16, stddev: 1371.90, median 9, min 0, max 9987 + 0.. 499: ####################################################### 4246 + 500.. 999: ###### 502 + 1000.. 1499: 13 + 1500.. 1999: 10 + 2000.. 2499: 14 + 2500.. 2999: 14 + 3000.. 3499: 20 + 3500.. 3999: 7 + 4000.. 4499: 13 + 4500.. 4999: 16 + 5000.. 5499: 12 + 5500.. 5999: 15 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 16 + 7500.. 7999: 12 + 8000.. 8499: 11 + 8500.. 8999: 16 + 9000.. 9499: 15 + 9500.. 9999: 20 + ++++ Stats for small_list len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 16.14, stddev: 24.86, median 6, min 0, max 99 + 0.. 4: ###################################################### 1923 + 5.. 9: ####################################################### 1936 + 10.. 14: # 61 + 15.. 19: # 59 + 20.. 24: # 62 + 25.. 29: # 70 + 30.. 34: # 61 + 35.. 39: # 64 + 40.. 44: # 64 + 45.. 49: # 56 + 50.. 54: # 65 + 55.. 59: # 55 + 60.. 64: # 60 + 65.. 69: # 62 + 70.. 74: # 57 + 75.. 79: # 69 + 80.. 84: ## 73 + 85.. 89: # 67 + 90.. 94: # 62 + 95.. 99: ## 74 + ++++ Stats for list_of_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.71, median 8, min 5, max 10 + 5: ####################################################### 867 + 6: ################################################### 813 + 7: ################################################### 815 + 8: #################################################### 833 + 9: ###################################################### 857 + 10: ################################################### 815 + ++++ Stats for list_repeat len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 42.00, stddev: 0.00, median 42, min 42, max 42 + 42: ####################################################### 5000 + ++++ Stats for array len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 400.16, stddev: 1371.90, median 9, min 0, max 9987 + 0.. 499: ####################################################### 4246 + 500.. 999: ###### 502 + 1000.. 1499: 13 + 1500.. 1999: 10 + 2000.. 2499: 14 + 2500.. 2999: 14 + 3000.. 3499: 20 + 3500.. 3999: 7 + 4000.. 4499: 13 + 4500.. 4999: 16 + 5000.. 5499: 12 + 5500.. 5999: 15 + 6000.. 6499: 15 + 6500.. 6999: 13 + 7000.. 7499: 16 + 7500.. 7999: 12 + 8000.. 8499: 11 + 8500.. 8999: 16 + 9000.. 9499: 15 + 9500.. 9999: 20 + ++++ Stats for small_array len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 16.14, stddev: 24.86, median 6, min 0, max 99 + 0.. 4: ###################################################### 1923 + 5.. 9: ####################################################### 1936 + 10.. 14: # 61 + 15.. 19: # 59 + 20.. 24: # 62 + 25.. 29: # 70 + 30.. 34: # 61 + 35.. 39: # 64 + 40.. 44: # 64 + 45.. 49: # 56 + 50.. 54: # 65 + 55.. 59: # 55 + 60.. 64: # 60 + 65.. 69: # 62 + 70.. 74: # 57 + 75.. 79: # 69 + 80.. 84: ## 73 + 85.. 89: # 67 + 90.. 94: # 62 + 95.. 99: ## 74 + ++++ Stats for array_of_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 7.49, stddev: 1.71, median 8, min 5, max 10 + 5: ####################################################### 867 + 6: ################################################### 813 + 7: ################################################### 815 + 8: #################################################### 833 + 9: ###################################################### 857 + 10: ################################################### 815 + ++++ Stats for array_repeat len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats len: + num: 5000, avg: 42.00, stddev: 0.00, median 42, min 42, max 42 + 42: ####################################################### 5000 + ++++ Stats for int_stats_neg ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 5000, avg: 0.17, stddev: 29.68, median 0, min -99, max 99 + -99..-90: # 65 + -89..-80: # 63 + -79..-70: # 64 + -69..-60: # 58 + -59..-50: # 67 + -49..-40: # 72 + -39..-30: # 61 + -29..-20: # 61 + -19..-10: # 67 + -9.. 0: ####################################################### 2076 + 1.. 10: ############################################## 1764 + 11.. 20: # 66 + 21.. 30: # 64 + 31.. 40: # 64 + 41.. 50: # 67 + 51.. 60: # 60 + 61.. 70: # 75 + 71.. 80: # 60 + 81.. 90: # 60 + 91..100: # 66 + ++++ Stats for small_signed_int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 0.90, stddev: 28.23, median 0, min -99, max 99 + -99..-90: # 12 + -89..-80: # 11 + -79..-70: # 9 + -69..-60: 6 + -59..-50: # 11 + -49..-40: # 13 + -39..-30: # 9 + -29..-20: # 13 + -19..-10: 8 + -9.. 0: ####################################################### 453 + 1.. 10: ######################################### 340 + 11.. 20: # 15 + 21.. 30: # 11 + 31.. 40: # 12 + 41.. 50: # 13 + 51.. 60: # 13 + 61.. 70: # 16 + 71.. 80: # 9 + 81.. 90: # 16 + 91..100: # 10 + ++++ Stats for small_nat dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 15.11, stddev: 23.27, median 6, min 0, max 99 + 0.. 4: #################################################### 377 + 5.. 9: ####################################################### 392 + 10.. 14: ## 20 + 15.. 19: ## 15 + 20.. 24: # 11 + 25.. 29: ## 17 + 30.. 34: ## 19 + 35.. 39: ## 17 + 40.. 44: # 10 + 45.. 49: # 9 + 50.. 54: # 8 + 55.. 59: # 9 + 60.. 64: ## 15 + 65.. 69: # 10 + 70.. 74: # 13 + 75.. 79: ## 19 + 80.. 84: # 11 + 85.. 89: # 13 + 90.. 94: 5 + 95.. 99: # 10 + ++++ Stats for nat dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 363.02, stddev: 1215.04, median 9, min 0, max 9476 + 0.. 473: ####################################################### 847 + 474.. 947: ###### 95 + 948..1421: 14 + 1422..1895: 3 + 1896..2369: 0 + 2370..2843: 3 + 2844..3317: 2 + 3318..3791: 3 + 3792..4265: 2 + 4266..4739: 4 + 4740..5213: 3 + 5214..5687: 4 + 5688..6161: 3 + 6162..6635: 4 + 6636..7109: 1 + 7110..7583: 4 + 7584..8057: 2 + 8058..8531: 1 + 8532..9005: 1 + 9006..9479: 4 + ++++ Stats for int_range (-43643) 435434 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 195335.64, stddev: 136803.99, median 195583, min -43624, max 435210 + -43624..-19683: ############################################ 52 + -19682.. 4259: ######################################## 47 + 4260.. 28201: ############################## 36 + 28202.. 52143: ############################################ 52 + 52144.. 76085: ########################################## 50 + 76086..100027: ####################################################### 64 + 100028..123969: ############################################### 55 + 123970..147911: ######################################## 47 + 147912..171853: ############################################## 54 + 171854..195795: #################################### 43 + 195796..219737: ############################################## 54 + 219738..243679: ########################################### 51 + 243680..267621: ################################################ 57 + 267622..291563: ########################################## 49 + 291564..315505: #################################### 42 + 315506..339447: ###################################### 45 + 339448..363389: ################################################ 57 + 363390..387331: ###################################### 45 + 387332..411273: ########################################## 49 + 411274..435215: ########################################### 51 + ++++ Stats for int_range (-40000) 40000 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: -173.78, stddev: 23042.92, median 180, min -39859, max 39942 + -39859..-35869: ############################################# 56 + -35868..-31878: ################################### 43 + -31877..-27887: ################################################# 60 + -27886..-23896: ##################################### 46 + -23895..-19905: ######################################## 49 + -19904..-15914: #################################### 45 + -15913..-11923: ############################################ 54 + -11922.. -7932: ############################################### 58 + -7931.. -3941: ######################################### 51 + -3940.. 50: ############################ 35 + 51.. 4041: ####################################### 48 + 4042.. 8032: ########################################## 52 + 8033.. 12023: ######################################### 51 + 12024.. 16014: ########################################### 53 + 16015.. 20005: ############################################ 54 + 20006.. 23996: ################################## 42 + 23997.. 27987: ####################################################### 67 + 27988.. 31978: ################################ 40 + 31979.. 35969: ######################################### 51 + 35970.. 39960: #################################### 45 + ++++ Stats for int_range (-4) 4 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 0.02, stddev: 2.55, median 0, min -4, max 4 + -4: ############################################ 99 + -3: ##################################################### 118 + -2: ################################################## 111 + -1: ################################################## 113 + 0: ################################################## 113 + 1: ##################################################### 118 + 2: ############################################# 102 + 3: ####################################################### 122 + 4: ############################################## 104 + ++++ Stats for int_range (-4) 17 dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 6.67, stddev: 6.39, median 7, min -4, max 17 + -4..-3: ############################################# 90 + -2..-1: ############################################# 91 + 0.. 1: ########################################## 84 + 2.. 3: ############################################## 92 + 4.. 5: ########################################### 87 + 6.. 7: ########################################### 86 + 8.. 9: ############################################ 89 + 10..11: ########################################### 87 + 12..13: ####################################################### 110 + 14..15: ############################################# 91 + 16..17: ############################################## 93 + 18..19: 0 + 20..21: 0 + 22..23: 0 + 24..25: 0 + 26..27: 0 + 28..29: 0 + 30..31: 0 + 32..33: 0 + 34..35: 0 + ++++ Stats for int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 100000, avg: 2541076923587387.50, stddev: 2660730801206827008.00, median 158655268318060, min -4611522359435274428, max 4611540922436307689 + -4611522359435274428..-4150369195341695293: ##################################################### 4976 + -4150369195341695292..-3689216031248116157: ##################################################### 4963 + -3689216031248116156..-3228062867154537021: ###################################################### 5038 + -3228062867154537020..-2766909703060957885: ##################################################### 4979 + -2766909703060957884..-2305756538967378749: ##################################################### 5001 + -2305756538967378748..-1844603374873799613: ##################################################### 4982 + -1844603374873799612..-1383450210780220477: ##################################################### 5025 + -1383450210780220476.. -922297046686641341: #################################################### 4901 + -922297046686641340.. -461143882593062205: ####################################################### 5126 + -461143882593062204.. 9281500516931: ##################################################### 5008 + 9281500516932.. 461162445594096067: ###################################################### 5041 + 461162445594096068.. 922315609687675203: ##################################################### 5001 + 922315609687675204.. 1383468773781254339: ##################################################### 4986 + 1383468773781254340.. 1844621937874833475: ##################################################### 4949 + 1844621937874833476.. 2305775101968412611: ##################################################### 5025 + 2305775101968412612.. 2766928266061991747: ##################################################### 5022 + 2766928266061991748.. 3228081430155570883: ##################################################### 4958 + 3228081430155570884.. 3689234594249150019: ##################################################### 4998 + 3689234594249150020.. 4150387758342729155: ##################################################### 4982 + 4150387758342729156.. 4611540922436308291: ###################################################### 5039 + ++++ Stats for oneof int dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: 4611686018427388.00, stddev: 2905870896563567616.00, median 0, min -4611686018427387904, max 4611686018427387903 + -4611686018427387904..-4150517416584649089: ################## 208 + -4150517416584649088..-3689348814741910273: 0 + -3689348814741910272..-3228180212899171457: 0 + -3228180212899171456..-2767011611056432641: 0 + -2767011611056432640..-2305843009213693825: 0 + -2305843009213693824..-1844674407370955009: 0 + -1844674407370955008..-1383505805528216193: 0 + -1383505805528216192.. -922337203685477377: 0 + -922337203685477376.. -461168601842738561: 0 + -461168601842738560.. 255: ####################################################### 603 + 256.. 461168601842739071: 0 + 461168601842739072.. 922337203685477887: 0 + 922337203685477888.. 1383505805528216703: 0 + 1383505805528216704.. 1844674407370955519: 0 + 1844674407370955520.. 2305843009213694335: 0 + 2305843009213694336.. 2767011611056433151: 0 + 2767011611056433152.. 3228180212899171967: 0 + 3228180212899171968.. 3689348814741910783: 0 + 3689348814741910784.. 4150517416584649599: 0 + 4150517416584649600.. 4611686018427387903: ################# 189 +================================================================================ +1 warning(s) +failure (26 tests failed, 1 tests errored, ran 64 tests) +random seed: 153870556 + ++++ Stats for int_dist_empty_bucket ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +stats dist: + num: 1000, avg: -55083208105414400.00, stddev: 1847115855773139200.00, median 9, min -4590718933436425025, max 4611686018427387903 + -4590718933436425025..-4130598685843234370: ## 26 + -4130598685843234369..-3670478438250043714: # 13 + -3670478438250043713..-3210358190656853058: ### 37 + -3210358190656853057..-2750237943063662402: ### 30 + -2750237943063662401..-2290117695470471746: ## 27 + -2290117695470471745..-1829997447877281090: ## 24 + -1829997447877281089..-1369877200284090434: ## 27 + -1369877200284090433.. -909756952690899778: ## 27 + -909756952690899777.. -449636705097709122: ## 21 + -449636705097709121.. 10483542495481534: ####################################################### 531 + 10483542495481535.. 470603790088672190: ## 21 + 470603790088672191.. 930724037681862846: ## 27 + 930724037681862847.. 1390844285275053502: ## 24 + 1390844285275053503.. 1850964532868244158: ## 25 + 1850964532868244159.. 2311084780461434814: ## 28 + 2311084780461434815.. 2771205028054625470: ## 23 + 2771205028054625471.. 3231325275647816126: ## 23 + 3231325275647816127.. 3691445523241006782: ## 25 + 3691445523241006783.. 4151565770834197438: # 17 + 4151565770834197439.. 4611686018427387903: ## 24 +================================================================================ +success (ran 1 tests)