Skip to content

Commit

Permalink
improve make example-runner
Browse files Browse the repository at this point in the history
  • Loading branch information
c-cube committed Nov 4, 2020
1 parent 7a9cd83 commit 25eab96
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ example-ounit-test:
@dune exec example/ounit/QCheck_ounit_test.exe

example-runner:
@dune exec example/QCheck_runner_test.exe -- --debug-shrink=log.tmp
@dune exec example/QCheck_runner_test.exe -- -v --debug-shrink=log.tmp

example-alcotest:
@dune exec example/alcotest/QCheck_alcotest_test.exe
Expand Down
9 changes: 6 additions & 3 deletions example/QCheck_runner_test.ml
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,12 @@ let find_ex =

let find_ex_uncaught_issue_99 : _ list =
let open QCheck in
let rs = make (find_example ~count:10 ~f:(fun _ -> false) Gen.int) in
let t1 = Test.make ~name:"FAIL_#99_1" rs (fun _ -> true) in
let t2 = Test.make ~name:"FAIL_#99_2" ~count:10 int (fun i -> i <= max_int) in
let t1 =
let rs = make (find_example ~count:10 ~f:(fun _ -> false) Gen.int) in
Test.make ~name:"FAIL_#99_1" rs (fun _ -> true) in
let t2 =
Test.make ~name:"should_succeed_#99_2" ~count:10 int
(fun i -> i <= max_int) in
[t1;t2]

(* test shrinking on integers *)
Expand Down

0 comments on commit 25eab96

Please sign in to comment.