File tree Expand file tree Collapse file tree 1 file changed +24
-4
lines changed
Expand file tree Collapse file tree 1 file changed +24
-4
lines changed Original file line number Diff line number Diff line change 1+ let (|>) x f = f x
2+
13let passing =
24 QCheck.Test. make ~count: 1000 ~long_factor: 2
35 ~name: " list_rev_is_involutive"
@@ -6,18 +8,36 @@ let passing =
68
79let failing =
810 QCheck.Test. make ~count: 10
9- ~name: " fail_sort_id "
10- QCheck. (list small_int)
11+ ~name: " should_fail_sort_id "
12+ QCheck. (small_list small_int)
1113 (fun l -> l = List. sort compare l);;
1214
1315exception Error
1416
1517let error =
1618 QCheck.Test. make ~count: 10
17- ~name: " error_raise_exn "
19+ ~name: " should_error_raise_exn "
1820 QCheck. int
1921 (fun _ -> raise Error )
2022
23+ open OUnit
24+
25+ let regression_23 =
26+ " issue_23" > ::
27+ (fun () ->
28+ let l = QCheck.Gen. (generate ~n: 100_000 char ) in
29+ OUnit. assert_bool " must contain '\255 '"
30+ (List. exists (fun c ->c = '\255' ) l)
31+ )
32+
33+ let regressions = [ regression_23 ]
34+ let others =
35+ [passing; failing; error]
36+ |> List. map (fun t -> QCheck_runner. to_ounit_test t)
37+
38+ let suite =
39+ " tests" > ::: (regressions @ others)
40+
2141let () =
22- QCheck_runner. run_tests_main [passing; failing; error]
42+ exit ( QCheck_runner. run suite)
2343
You can’t perform that action at this time.
0 commit comments