How to add new tests:
-
Create a new
.mlfile containing the tests (or add unit tests to one of the existing test.mlfiles) -
includethe 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.mlcontains Alcotest utilities (e.g.testableinstances) to facilitate writing unit tests- The
mk_testfunction in particular simplifies the process of writing Alcotest test cases
- The