Skip to content

Commit

Permalink
Merge pull request #237 from jmid/more-unit-and-expect-tests
Browse files Browse the repository at this point in the history
More expect tests and decoupling expect test source and runner
  • Loading branch information
jmid authored Apr 19, 2022
2 parents 0eb5948 + 08a138f commit 6f6a35b
Show file tree
Hide file tree
Showing 7 changed files with 1,727 additions and 1,597 deletions.
40 changes: 33 additions & 7 deletions test/core/QCheck2_expect_test.expected
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Test should_error_raise_exn errored on (1 shrink steps):

0

exception Dune__exe__QCheck2_expect_test.Overall.Error
exception QCheck2_tests.Overall.Error


+++ Collect ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down Expand Up @@ -244,6 +244,14 @@ 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 FAIL_bad_gen failed:

ERROR: uncaught exception in generator for test FAIL_bad_gen after 100 steps:
Exception: Invalid_argument("Gen.int_bound")
Backtrace:

--- Failure --------------------------------------------------------------------

Test char never produces '\255' failed (0 shrink steps):
Expand Down Expand Up @@ -312,6 +320,12 @@ Test string never has a \255 char failed (59 shrink steps):

--- Failure --------------------------------------------------------------------

Test strings have unique chars failed (18 shrink steps):

"aaaaaaaaaaaaa"

--- Failure --------------------------------------------------------------------

Test pairs have different components failed (0 shrink steps):

(4, 4)
Expand All @@ -336,24 +350,36 @@ Test pairs are (0,0) failed (63 shrink steps):

--- Failure --------------------------------------------------------------------

Test pairs are ordered failed (2 shrink steps):
Test pairs are ordered failed (94 shrink steps):

(0, -1)
(1, 0)

--- Failure --------------------------------------------------------------------

Test pairs are ordered reversely failed (63 shrink steps):
Test pairs are ordered reversely failed (62 shrink steps):

(0, 1)

--- Failure --------------------------------------------------------------------

Test pairs sum to less than 128 failed (59 shrink steps):
Test pairs sum to less than 128 failed (56 shrink steps):

(0, 128)

--- Failure --------------------------------------------------------------------

Test pairs lists rev concat failed (83 shrink steps):

([0], [1])

--- Failure --------------------------------------------------------------------

Test pairs lists no overlap failed (27 shrink steps):

([0], [0; 0; 0; 0])

--- Failure --------------------------------------------------------------------

Test triples have pair-wise different components failed (3 shrink steps):

(0, 0, 0)
Expand Down Expand Up @@ -408,7 +434,7 @@ Test bind ordered pairs failed (1 shrink steps):

--- Failure --------------------------------------------------------------------

Test bind list_size constant failed (15 shrink steps):
Test bind list_size constant failed (12 shrink steps):

(4, [0; 0; 0; 0])

Expand Down Expand Up @@ -1216,7 +1242,7 @@ stats dist:
4150517416584649600.. 4611686018427387903: ################# 189
================================================================================
1 warning(s)
failure (53 tests failed, 1 tests errored, ran 110 tests)
failure (57 tests failed, 1 tests errored, ran 114 tests)
random seed: 153870556

+++ Stats for int_dist_empty_bucket ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Expand Down
Loading

0 comments on commit 6f6a35b

Please sign in to comment.