How to add new tests:
-
Create a new
.ml
file containing the tests (or add unit tests to one of the existing test.ml
files) -
include
the name of the test module inall_tests.ml
- e.g. if the name of the new test module is
test_deriver
, put the following inall_tests.ml
:
include Test_deriver ...
- e.g. if the name of the new test module is
-
Then, invoke the newly-added test functions in
test_runner.ml
, which executes all the Alcotest test cases defined in this directory -
Note:
boilerplate.ml
contains Alcotest utilities (e.g.testable
instances) to facilitate writing unit tests- The
mk_test
function in particular simplifies the process of writing Alcotest test cases
- The