Update upstream source from tag 'upstream/0.18.1'
Update to upstream version '0.18.1'
with Debian dir ee727e61298f3f78c0528691e617a92dda47f78d
Stephane Glondu authored 2 years ago
Stephane Glondu committed 2 years ago
1 | 1 | Rudi Grinberg <rudi.grinberg@gmail.com> |
2 | 2 | Jacques-Pascal Deplaix <jp.deplaix@gmail.com> |
3 | 3 | Jan Midtgaard <mail@janmidtgaard.dk> |
4 | Valentin Chaboche <valentin.chb@gmail.com> |
0 | 0 | # Changes |
1 | ||
2 | ## 0.18.1 | |
3 | ||
4 | - fix `Gen.{nat,pos}_split{2,}` | |
5 | - fix stack overflow in #156 | |
1 | 6 | |
2 | 7 | ## 0.18 |
3 | 8 |
401 | 401 | |
402 | 402 | ---- |
403 | 403 | |
404 | === Deriver | |
405 | ||
406 | A ppx_deriver is provided to derive QCheck generators from a type declaration. | |
407 | ||
408 | ```ocaml | |
409 | type tree = Leaf of int | Node of tree * tree | |
410 | [@@deriving qcheck] | |
411 | ``` | |
412 | ||
413 | See the according https://github.com/c-cube/qcheck/tree/master/src/ppx_deriving_qcheck/[README] | |
414 | for more information and examples. | |
415 | ||
404 | 416 | === Compatibility notes |
405 | 417 | |
406 | 418 | Starting with 0.9, the library is split into several components: |
0 | 0 | qcheck random seed: 1234 |
1 | 1 | Testing `my test'. |
2 | ||
3 | 2 | [OK] suite 0 list_rev_is_involutive. |
4 | 3 | > [FAIL] suite 1 fail_sort_id. |
5 | 4 | [FAIL] suite 2 error_raise_exn. |
6 | 5 | [FAIL] suite 3 fail_check_err_message. |
7 | 6 | [OK] suite 4 tree_rev_is_involutive. |
8 | ||
9 | 7 | ┌──────────────────────────────────────────────────────────────────────────────┐ |
10 | 8 | │ [FAIL] suite 1 fail_sort_id. │ |
11 | 9 | └──────────────────────────────────────────────────────────────────────────────┘ |
12 | ||
13 | 10 | test `fail_sort_id` failed on ≥ 1 cases: [1; 0] (after 20 shrink steps) |
14 | ||
15 | 11 | [exception] test `fail_sort_id` failed on ≥ 1 cases: [1; 0] (after 20 shrink steps) |
16 | ||
17 | ||
18 | ||
19 | 12 | ────────────────────────────────────────────────────────────────────────────── |
20 | ||
21 | 13 | 3 failures! 5 tests run. |
10 | 10 | | grep -v 'Logs saved to' \ |
11 | 11 | | grep -v 'Raised at ' \ |
12 | 12 | | grep -v 'Called from ' \ |
13 | | sed 's/! in .*s\./!/' | |
13 | | sed 's/! in .*s\./!/' \ | |
14 | | sed 's/[ \t]*$//g' \ | |
15 | | tr -s "\n" | |
14 | 16 | exit $CODE |
4 | 4 | license: "BSD-2-Clause" |
5 | 5 | synopsis: "Alcotest backend for qcheck" |
6 | 6 | doc: ["http://c-cube.github.io/qcheck/"] |
7 | version: "0.18" | |
7 | version: "0.18.1" | |
8 | 8 | tags: [ |
9 | 9 | "test" |
10 | 10 | "quickcheck" |
4 | 4 | license: "BSD-2-Clause" |
5 | 5 | synopsis: "Core qcheck library" |
6 | 6 | doc: ["http://c-cube.github.io/qcheck/"] |
7 | version: "0.18" | |
7 | version: "0.18.1" | |
8 | 8 | tags: [ |
9 | 9 | "test" |
10 | 10 | "property" |
4 | 4 | homepage: "https://github.com/c-cube/qcheck/" |
5 | 5 | doc: ["http://c-cube.github.io/qcheck/"] |
6 | 6 | synopsis: "OUnit backend for qcheck" |
7 | version: "0.18" | |
7 | version: "0.18.1" | |
8 | 8 | tags: [ |
9 | 9 | "qcheck" |
10 | 10 | "quickcheck" |
4 | 4 | homepage: "https://github.com/c-cube/qcheck/" |
5 | 5 | license: "BSD-2-Clause" |
6 | 6 | doc: ["http://c-cube.github.io/qcheck/"] |
7 | version: "0.18" | |
7 | version: "0.18.1" | |
8 | 8 | tags: [ |
9 | 9 | "test" |
10 | 10 | "property" |
247 | 247 | List.sort (fun (w1, _) (w2, _) -> poly_compare w1 w2) samples |> List.rev_map snd |
248 | 248 | |
249 | 249 | let range_subset ~size low high st = |
250 | if not (low <= high && size <= high - low + 1) then invalid_arg "Gen.range_subset"; | |
250 | let range_size = high - low + 1 in | |
251 | if not (0 <= size && size <= range_size) then | |
252 | invalid_arg "Gen.range_subset"; | |
251 | 253 | (* The algorithm below is attributed to Floyd, see for example |
252 | 254 | https://eyalsch.wordpress.com/2010/04/01/random-sample/ |
253 | 255 | https://math.stackexchange.com/questions/178690 |
254 | 256 | |
255 | Note: the code be made faster by checking membership in [arr] | |
256 | directly instead of using an additional Set. None of our | |
257 | dependencies implements dichotomic search, so using Set is | |
258 | easier. | |
257 | Note: the code is easier to read when drawing from [0..range_size-1] | |
258 | rather than [low..high]. We draw in [0..bound], and shift the | |
259 | results by adding [low] when writing them to the result array. | |
259 | 260 | *) |
260 | 261 | let module ISet = Set.Make(Int) in |
261 | 262 | let s = ref ISet.empty in |
262 | let arr = Array.make size 0 in | |
263 | for i = high - size to high do | |
264 | let pos = int_range high i st in | |
265 | let choice = | |
266 | if ISet.mem pos !s then i else pos | |
267 | in | |
268 | arr.(i - low) <- choice; | |
263 | for i = range_size - size to range_size - 1 do | |
264 | let pos = int_range 0 i st in | |
265 | let choice = if ISet.mem pos !s then i else pos in | |
269 | 266 | s := ISet.add choice !s; |
270 | 267 | done; |
268 | let arr = Array.make size 0 in | |
269 | let idx = ref 0 in | |
270 | ISet.iter (fun choice -> arr.(!idx) <- low + choice; incr idx) !s; | |
271 | 271 | arr |
272 | 272 | |
273 | 273 | let array_subset size arr st = |
333 | 333 | |
334 | 334 | (* nat splitting *) |
335 | 335 | |
336 | let nat_split2 n st = | |
337 | if (n < 2) then invalid_arg "nat_split2"; | |
336 | let pos_split2 n st = | |
337 | if (n < 2) then invalid_arg "pos_split2"; | |
338 | 338 | let n1 = int_range 1 (n - 1) st in |
339 | 339 | (n1, n - n1) |
340 | 340 | |
341 | let pos_split2 n st = | |
341 | let nat_split2 n st = | |
342 | if (n < 0) then invalid_arg "nat_split2"; | |
342 | 343 | let n1 = int_range 0 n st in |
343 | 344 | (n1, n - n1) |
344 | 345 | |
345 | 346 | let pos_split ~size:k n st = |
346 | if (k > n) then invalid_arg "nat_split"; | |
347 | (* To split n into n{0}+n{1}+..+n{k-1}, we draw distinct "boundaries" | |
348 | b{-1}..b{k-1}, with b{-1}=0 and b{k-1} = n | |
349 | and the k-1 intermediate boundaries b{0}..b{k-2} | |
350 | chosen randomly distinct in [1;n-1]. | |
351 | ||
352 | Then each n{i} is defined as b{i}-b{i-1}. *) | |
353 | let b = range_subset ~size:(k-1) 1 (n - 1) st in | |
354 | Array.init k (fun i -> | |
355 | if i = 0 then b.(0) | |
356 | else if i = k-1 then n - b.(i-1) | |
357 | else b.(i) - b.(i-1) | |
358 | ) | |
347 | if (n < 0) then invalid_arg "pos_split"; | |
348 | if 0 = k && 0 = n then [||] | |
349 | else begin | |
350 | if not (0 < k && k <= n) then invalid_arg "pos_split"; | |
351 | (* To split n into n{0}+n{1}+..+n{k-1}, we draw distinct "boundaries" | |
352 | b{-1}..b{k-1}, with b{-1}=0 and b{k-1} = n | |
353 | and the k-1 intermediate boundaries b{0}..b{k-2} | |
354 | chosen randomly distinct in [1;n-1]. | |
355 | ||
356 | Then each n{i} is defined as b{i}-b{i-1}. *) | |
357 | let b = range_subset ~size:(k-1) 1 (n - 1) st in | |
358 | if k = 1 then [|n|] | |
359 | else Array.init k (fun i -> | |
360 | if i = 0 then b.(0) | |
361 | else if i = k-1 then n - b.(i-1) | |
362 | else b.(i) - b.(i-1) | |
363 | ) | |
364 | end | |
359 | 365 | |
360 | 366 | let nat_split ~size:k n st = |
367 | if not (0 <= k && 0 <= n) then invalid_arg "nat_split"; | |
361 | 368 | pos_split ~size:k (n+k) st |
362 | 369 | |> Array.map (fun v -> v - 1) |
363 | 370 |
466 | 466 | |
467 | 467 | This is useful to split sizes to combine sized generators. |
468 | 468 | |
469 | @raise Invalid_argument unless [n >= 2]. | |
470 | ||
471 | 469 | @since 0.18 |
472 | 470 | *) |
473 | 471 | |
474 | 472 | val pos_split2 : int -> (int * int) t |
475 | (** [nat_split2 n] generates pairs [(n1, n2)] of strictly positive | |
473 | (** [pos_split2 n] generates pairs [(n1, n2)] of strictly positive | |
476 | 474 | (nonzero) natural numbers with [n1 + n2 = n]. |
475 | ||
476 | @raise Invalid_argument unless [n >= 2]. | |
477 | 477 | |
478 | 478 | This is useful to split sizes to combine sized generators. |
479 | 479 | |
481 | 481 | *) |
482 | 482 | |
483 | 483 | val nat_split : size:int -> int -> int array t |
484 | (** [nat_split2 ~size:k n] generates [k]-sized arrays [n1,n2,..nk] | |
484 | (** [nat_split ~size:k n] generates [k]-sized arrays [n1,n2,..nk] | |
485 | 485 | of natural numbers in [[0;n]] with [n1 + n2 + ... + nk = n]. |
486 | 486 | |
487 | 487 | This is useful to split sizes to combine sized generators. |
492 | 492 | *) |
493 | 493 | |
494 | 494 | val pos_split : size:int -> int -> int array t |
495 | (** [nat_split2 ~size:k n] generates [k]-sized arrays [n1,n2,..nk] | |
495 | (** [pos_split ~size:k n] generates [k]-sized arrays [n1,n2,..nk] | |
496 | 496 | of strictly positive (non-zero) natural numbers with |
497 | 497 | [n1 + n2 + ... + nk = n]. |
498 | 498 | |
500 | 500 | |
501 | 501 | Complexity O(k log k). |
502 | 502 | |
503 | @raise Invalid_argument unless [k <= n]. | |
503 | @raise Invalid_argument unless [0 < k <= n] or [0 = k = n]. | |
504 | 504 | |
505 | 505 | @since 0.18 |
506 | 506 | *) |
527 | 527 | |
528 | 528 | let ui64 : int64 t = map Int64.abs int64 |
529 | 529 | |
530 | (* A tail-recursive implementation over Tree.t *) | |
530 | 531 | let list_size (size : int t) (gen : 'a t) : 'a list t = |
531 | size >>= fun size -> | |
532 | let rec loop n = | |
532 | fun st -> | |
533 | Tree.bind (size st) @@ fun size -> | |
534 | let rec loop n acc = | |
533 | 535 | if n <= 0 |
534 | then pure [] | |
535 | else liftA2 List.cons gen (loop (n - 1)) | |
536 | in | |
537 | loop size | |
536 | then acc | |
537 | else (loop [@tailcall]) (n - 1) (Tree.liftA2 List.cons (gen st) acc) | |
538 | in | |
539 | loop size (Tree.pure []) | |
538 | 540 | |
539 | 541 | let list (gen : 'a t) : 'a list t = list_size nat gen |
540 | 542 |
38 | 38 | {[ |
39 | 39 | let test = |
40 | 40 | QCheck2.(Test.make ~count:1000 |
41 | ~pp:Print.(list int) | |
41 | ~print:Print.(list int) | |
42 | 42 | Gen.(list int) |
43 | 43 | (fun l -> List.rev (List.rev l) = l));; |
44 | 44 | |
57 | 57 | Test.make |
58 | 58 | ~name:"All lists are sorted" |
59 | 59 | ~count:10_000 |
60 | ~pp:Print.(list small_nat) | |
60 | ~print:Print.(list int) | |
61 | 61 | Gen.(list small_nat) |
62 | 62 | (fun l -> l = List.sort compare l));; |
63 | 63 |
222 | 222 | Printf.fprintf out "\n~~~ %a %s\n\n" |
223 | 223 | (Color.pp_str_c ~colors `Cyan) "Shrink" (String.make 69 '~'); |
224 | 224 | Printf.fprintf out |
225 | "Test %s sucessfully shrunk counter example (step %d) to:\n\n%a\n%!" | |
225 | "Test %s successfully shrunk counter example (step %d) to:\n\n%a\n%!" | |
226 | 226 | name i |
227 | 227 | (debug_shrinking_counter_example cell) x |
228 | 228 |
99 | 99 | (** Run a suite of tests, and print its results. This is an heritage from |
100 | 100 | the "qcheck" library. |
101 | 101 | @return an error code, [0] if all tests passed, [1] otherwise. |
102 | @param colors if true, colorful output | |
103 | @param verbose if true, prints more information about test cases *) | |
102 | @param colors if true (default), colorful output | |
103 | @param verbose if true, prints more information about test cases (default: [false]) | |
104 | @param long if true, runs the long versions of the tests (default: [false]) | |
105 | @param debug_shrink [debug_shrink:(Some ch)] writes a log of successful shrink | |
106 | attempts to channel [ch], for example [~debug_shrink:(Some (open_out "mylog.txt"))]. | |
107 | Use together with a non-empty list in [~debug_shrink_list]. | |
108 | @param debug_shrink_list the test names to log successful shrink attempts for, | |
109 | for example [~debug_shrink_list:["list_rev_is_involutive"]]. | |
110 | Requires [~debug_shrink] to be [Some ch]. | |
111 | @param out print output to the provided channel (default: [stdout]) | |
112 | @param rand start the test runner in the provided RNG state *) | |
104 | 113 | |
105 | 114 | val run_tests_main : ?argv:string array -> QCheck2.Test.t list -> 'a |
106 | 115 | (** Can be used as the main function of a test file. Exits with a non-0 code |
181 | 181 | |
182 | 182 | let strings_are_empty = |
183 | 183 | Test.make ~name:"strings are empty" ~count:1000 ~print:Print.string |
184 | Gen.string (fun s -> (*Printf.printf "\"%s\"\n" (String.escaped s);*) s = "") | |
184 | Gen.string (fun s -> s = "") | |
185 | 185 | |
186 | 186 | let string_never_has_000_char = |
187 | 187 | Test.make ~name:"string never has a \\000 char" ~count:1000 ~print:Print.string |
202 | 202 | |
203 | 203 | let list_shorter_10 = |
204 | 204 | Test.make ~name:"lists shorter than 10" ~print:Print.(list int) |
205 | Gen.(list small_int) (fun xs -> (*print_list xs;*) List.length xs < 10) | |
205 | Gen.(list small_int) (fun xs -> List.length xs < 10) | |
206 | 206 | |
207 | 207 | let length_printer xs = |
208 | 208 | Printf.sprintf "[...] list length: %i" (List.length xs) |
211 | 211 | |
212 | 212 | let list_shorter_432 = |
213 | 213 | Test.make ~name:"lists shorter than 432" ~print:length_printer |
214 | Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) | |
215 | (fun xs -> (*print_list xs;*) List.length xs < 432) | |
214 | Gen.(list_size size_gen small_int) | |
215 | (fun xs -> List.length xs < 432) | |
216 | 216 | |
217 | 217 | let list_shorter_4332 = |
218 | 218 | Test.make ~name:"lists shorter than 4332" ~print:length_printer |
219 | Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) | |
220 | (fun xs -> (*print_list xs;*) List.length xs < 4332) | |
219 | Gen.(list_size size_gen small_int) | |
220 | (fun xs -> List.length xs < 4332) | |
221 | 221 | |
222 | 222 | let list_equal_dupl = |
223 | Test.make ~name:"lists equal to duplication" ~print:length_printer | |
224 | Gen.(list_size size_gen small_int) (*Gen.(list small_int)*) | |
223 | Test.make ~name:"lists equal to duplication" ~print:Print.(list int) | |
224 | Gen.(list_size size_gen small_int) | |
225 | 225 | (fun xs -> try xs = xs @ xs |
226 | 226 | with Stack_overflow -> false) |
227 | 227 |
82 | 82 | true) |
83 | 83 | end |
84 | 84 | |
85 | (* positive tests of the various generators *) | |
85 | (* positive tests of the various generators | |
86 | ||
87 | Note: it is important to disable shrinking for these tests, as the | |
88 | shrinkers will suggest inputs that are coming from the generator | |
89 | themselves -- which we want to test -- so their reduced | |
90 | counter-example are confusing rather than helpful. | |
91 | ||
92 | This is achieved by using (Test.make ~print ...), without a ~shrink | |
93 | argument. | |
94 | *) | |
86 | 95 | module Generator = struct |
87 | 96 | open QCheck |
88 | 97 | |
126 | 135 | ~name:"tree_rev_is_involutive" |
127 | 136 | QCheck.(make IntTree.gen_tree) |
128 | 137 | (fun tree -> IntTree.(rev_tree (rev_tree tree)) = tree) |
138 | ||
139 | let nat_split2_spec = | |
140 | Test.make ~name:"nat_split2 spec" | |
141 | (make | |
142 | ~print:Print.(pair int (pair int int)) | |
143 | Gen.(small_nat >>= fun n -> | |
144 | pair (return n) (nat_split2 n))) | |
145 | (fun (n, (a, b)) -> | |
146 | 0 <= a && 0 <= b && a + b = n) | |
147 | ||
148 | let pos_split2_spec = | |
149 | Test.make ~name:"pos_split2 spec" | |
150 | (make | |
151 | ~print:Print.(pair int (pair int int)) | |
152 | Gen.(small_nat >>= fun n -> | |
153 | (* we need n > 2 *) | |
154 | let n = n + 2 in | |
155 | pair (return n) (pos_split2 n))) | |
156 | (fun (n, (a, b)) -> | |
157 | (0 < a && 0 < b && a + b = n)) | |
158 | ||
159 | let range_subset_spec = | |
160 | Test.make ~name:"range_subset_spec" | |
161 | (make | |
162 | ~print:Print.(quad int int int (array int)) | |
163 | Gen.(pair small_nat small_nat >>= fun (m, n) -> | |
164 | (* we must guarantee [low <= high] | |
165 | and [size <= high - low + 1] *) | |
166 | let low = m and high = m + n in | |
167 | int_range 0 (high - low + 1) >>= fun size -> | |
168 | quad (return size) (return low) (return high) | |
169 | (range_subset ~size low high))) | |
170 | (fun (size, low, high, arr) -> | |
171 | if size = 0 then arr = [||] | |
172 | else | |
173 | Array.length arr = size | |
174 | && low <= arr.(0) | |
175 | && Array.for_all (fun (a, b) -> a < b) | |
176 | (Array.init (size - 1) (fun k -> arr.(k), arr.(k+1))) | |
177 | && arr.(size - 1) <= high) | |
178 | ||
179 | let nat_split_n_way = | |
180 | Test.make ~name:"nat_split n-way" | |
181 | (make | |
182 | ~print:Print.(pair int (array int)) | |
183 | Gen.(small_nat >>= fun n -> | |
184 | pair (return n) (nat_split ~size:n n))) | |
185 | (fun (n, arr) -> | |
186 | Array.length arr = n | |
187 | && Array.for_all (fun k -> 0 <= k) arr | |
188 | && Array.fold_left (+) 0 arr = n) | |
189 | ||
190 | let nat_split_smaller = | |
191 | Test.make ~name:"nat_split smaller" | |
192 | (make | |
193 | ~print:Print.(triple int int (array int)) | |
194 | Gen.(small_nat >>= fun size -> | |
195 | int_bound size >>= fun n -> | |
196 | triple (return size) (return n) (nat_split ~size n))) | |
197 | (fun (m, n, arr) -> | |
198 | Array.length arr = m | |
199 | && Array.for_all (fun k -> 0 <= k) arr | |
200 | && Array.fold_left (+) 0 arr = n) | |
201 | ||
202 | let pos_split = | |
203 | Test.make ~name:"pos_split" | |
204 | (make | |
205 | ~print:Print.(triple int int (array int)) | |
206 | Gen.(pair small_nat small_nat >>= fun (m, n) -> | |
207 | (* we need both size>0 and n>0 and size <= n *) | |
208 | let size = 1 + min m n and n = 1 + max m n in | |
209 | triple (return size) (return n) (pos_split ~size n))) | |
210 | (fun (m, n, arr) -> | |
211 | Array.length arr = m | |
212 | && Array.for_all (fun k -> 0 < k) arr | |
213 | && Array.fold_left (+) 0 arr = n) | |
129 | 214 | end |
130 | 215 | |
131 | 216 | (* negative tests that exercise shrinking behaviour *) |
177 | 262 | |
178 | 263 | let strings_are_empty = |
179 | 264 | Test.make ~name:"strings are empty" ~count:1000 |
180 | string (fun s -> (*Printf.printf "\"%s\"\n" (String.escaped s);*) s = "") | |
265 | string (fun s -> s = "") | |
181 | 266 | |
182 | 267 | let string_never_has_000_char = |
183 | 268 | Test.make ~name:"string never has a \\000 char" ~count:1000 |
197 | 282 | |
198 | 283 | let list_shorter_10 = |
199 | 284 | Test.make ~name:"lists shorter than 10" |
200 | (list small_int) (fun xs -> (*print_list xs;*) List.length xs < 10) | |
285 | (list small_int) (fun xs -> List.length xs < 10) | |
201 | 286 | |
202 | 287 | let length_printer xs = |
203 | 288 | Printf.sprintf "[...] list length: %i" (List.length xs) |
206 | 291 | |
207 | 292 | let list_shorter_432 = |
208 | 293 | Test.make ~name:"lists shorter than 432" |
209 | (set_print length_printer (list_of_size size_gen small_int)) (*(list small_int)*) | |
210 | (fun xs -> (*print_list xs;*) List.length xs < 432) | |
294 | (set_print length_printer (list_of_size size_gen small_int)) | |
295 | (fun xs -> List.length xs < 432) | |
211 | 296 | |
212 | 297 | let list_shorter_4332 = |
213 | 298 | Test.make ~name:"lists shorter than 4332" |
214 | 299 | (set_shrink Shrink.list_spine (set_print length_printer (list_of_size size_gen small_int))) |
215 | (fun xs -> (*print_list xs;*) List.length xs < 4332) | |
300 | (fun xs -> List.length xs < 4332) | |
216 | 301 | |
217 | 302 | let list_equal_dupl = |
218 | 303 | Test.make ~name:"lists equal to duplication" |
219 | (set_print length_printer (list_of_size size_gen small_int)) | |
220 | (*(set_print length_printer (list small_int))*) | |
304 | (list_of_size size_gen small_int) | |
221 | 305 | (fun xs -> try xs = xs @ xs |
222 | 306 | with Stack_overflow -> false) |
223 | 307 | |
385 | 469 | let tree_depth_test = |
386 | 470 | let depth = ("depth", IntTree.depth) in |
387 | 471 | Test.make ~name:"tree's depth" ~count:1000 (add_stat depth (make IntTree.gen_tree)) (fun _ -> true) |
472 | ||
473 | let range_subset_test = | |
474 | Test.make ~name:"range_subset_spec" ~count:5_000 | |
475 | (add_stat ("dist", fun a -> a.(0)) (make (Gen.range_subset ~size:1 0 20))) | |
476 | (fun a -> Array.length a = 1) | |
388 | 477 | end |
389 | 478 | |
390 | 479 | (* Calling runners *) |
407 | 496 | Generator.list_repeat_test; |
408 | 497 | Generator.array_repeat_test; |
409 | 498 | Generator.passing_tree_rev; |
499 | Generator.nat_split2_spec; | |
500 | Generator.pos_split2_spec; | |
501 | Generator.range_subset_spec; | |
502 | Generator.nat_split_n_way; | |
503 | Generator.nat_split_smaller; | |
504 | Generator.pos_split; | |
410 | 505 | (*Shrink.test_fac_issue59;*) |
411 | 506 | Shrink.big_bound_issue59; |
412 | 507 | Shrink.long_shrink; |
435 | 530 | FindExample.find_ex_uncaught_issue_99_2_succeed; |
436 | 531 | Stats.bool_dist; |
437 | 532 | Stats.char_dist; |
438 | Stats.tree_depth_test] | |
533 | Stats.tree_depth_test; | |
534 | Stats.range_subset_test] | |
439 | 535 | @ Stats.string_len_tests |
440 | 536 | @ Stats.list_len_tests |
441 | 537 | @ Stats.array_len_tests |
317 | 317 | |
318 | 318 | --- Failure -------------------------------------------------------------------- |
319 | 319 | |
320 | Test lists shorter than 432 failed: | |
321 | ||
322 | ERROR: uncaught exception in generator for test lists shorter than 432 after 100 steps: | |
323 | Exception: Stack overflow | |
324 | Backtrace: | |
325 | ||
326 | --- Failure -------------------------------------------------------------------- | |
327 | ||
328 | Test lists shorter than 4332 failed: | |
329 | ||
330 | ERROR: uncaught exception in generator for test lists shorter than 4332 after 100 steps: | |
331 | Exception: Stack overflow | |
332 | Backtrace: | |
333 | ||
334 | --- Failure -------------------------------------------------------------------- | |
335 | ||
336 | Test lists equal to duplication failed: | |
337 | ||
338 | ERROR: uncaught exception in generator for test lists equal to duplication after 100 steps: | |
339 | Exception: Stack overflow | |
340 | Backtrace: | |
320 | Test lists shorter than 432 failed (412 shrink steps): | |
321 | ||
322 | [...] list length: 432 | |
323 | ||
324 | --- Failure -------------------------------------------------------------------- | |
325 | ||
326 | Test lists shorter than 4332 failed (4022 shrink steps): | |
327 | ||
328 | [...] list length: 4332 | |
329 | ||
330 | --- Failure -------------------------------------------------------------------- | |
331 | ||
332 | Test lists equal to duplication failed (4 shrink steps): | |
333 | ||
334 | [0] | |
341 | 335 | |
342 | 336 | --- Failure -------------------------------------------------------------------- |
343 | 337 |
266 | 266 | |
267 | 267 | Test lists equal to duplication failed (20 shrink steps): |
268 | 268 | |
269 | [...] list length: 1 | |
269 | [0] | |
270 | 270 | |
271 | 271 | --- Failure -------------------------------------------------------------------- |
272 | 272 | |
376 | 376 | 13: # 9 |
377 | 377 | 14: # 7 |
378 | 378 | 15: 4 |
379 | ||
380 | +++ Stats for range_subset_spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | |
381 | ||
382 | stats dist: | |
383 | num: 5000, avg: 9.97, stddev: 6.08, median 10, min 0, max 20 | |
384 | 0: ################################################# 246 | |
385 | 1: ################################################ 244 | |
386 | 2: ################################################ 240 | |
387 | 3: ################################################ 243 | |
388 | 4: ############################################## 232 | |
389 | 5: ############################################## 230 | |
390 | 6: ############################################### 239 | |
391 | 7: ############################################### 235 | |
392 | 8: ####################################################### 274 | |
393 | 9: ############################################## 233 | |
394 | 10: ########################################## 212 | |
395 | 11: ############################################## 231 | |
396 | 12: ############################################### 239 | |
397 | 13: ############################################# 226 | |
398 | 14: ############################################# 225 | |
399 | 15: ################################################### 256 | |
400 | 16: ################################################ 240 | |
401 | 17: ############################################# 229 | |
402 | 18: ################################################ 243 | |
403 | 19: ################################################## 253 | |
404 | 20: ############################################## 230 | |
379 | 405 | |
380 | 406 | +++ Stats for string_size len dist ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
381 | 407 | |
862 | 888 | 4150517416584649600.. 4611686018427387903: ################# 189 |
863 | 889 | ================================================================================ |
864 | 890 | 1 warning(s) |
865 | failure (26 tests failed, 1 tests errored, ran 66 tests) | |
891 | failure (26 tests failed, 1 tests errored, ran 73 tests) | |
866 | 892 | random seed: 153870556 |
867 | 893 | |
868 | 894 | +++ Stats for int_dist_empty_bucket ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |