Copy these files into your project:
- The
testscript will be your main command to run tests and to manage test results. It is customizable. Rename it if needed. tests/test.mlis the entry point of your OCaml test program. Add tests in there.tests/duneis set up to build and run tests with dune.
Commands you should try:
dune build: build everything including the test executable.dune build tests/test.exewill build only the test executable../test: invoke the test executable and run the test suite. This is the same as./test run../test status: print the status of the test results without running tests. Try--helpto see what options are available.dune runtest: build and run the test suite without arguments. Use-fto force a re-run.- Edit the tests in
tests/test.mland see what happens.
See also: