cmdliner to be compatible with cmdliner.2.0.0 (@MisterDA, #424)seq, a testable for Seq.t and contramap (#412 @xvw)V1.Skip exception (#415, #416, @Khady)match_raises now expects the user-defined function to return true for expected exceptions. Previously false was interpreted as an expected exception. (#418, #419, @psafont)match_raises, a generalized version of check_raises (#88, #386, @JoanThibault)ALCOTEST_COLUMNS env var. (#322, #381, @MisterDA)CI env var to detect CIs. Improve CI detection. (#397, @MisterDA)alcotest_stubs.c to compile with MSVC (#369, @jonahbeckford, review by @TheLortex and @MisterDA)dune >= 3.0. (#360, @MisterDA)async>=v0.15.0 (#352, @crackcomm)js_of_ocaml.3.11.0. Users can depend on the new virtual alcotest-js Opam library to pick up the right js_of_ocaml version automatically. (#326 #328, @hhugo @smorimoto)~record_backtrace:false to Alcotest.run. (#317, @CraigFe)Alcotest.{char,string} pretty-printers to use OCaml syntax on assertion failures (i.e. wrap with quotes and escape control characters). (#318, @CraigFe)test alpha 1-4), as advertised in the manpage. The previously-used '..' separator is also supported. (#312, @CraigFe)Alcotest.V1 module that aliases the existing Alcotest API and provides a stability guarantee over major version changes. Similar versioned aliases also exist for the backends: Alcotest_{async,lwt}.V1. (#306, @CraigFe)~filter argument to Alcotest.run to be a predicate over tests. (#305, @CraigFe)Renamed / removed some less frequently used modules used by the test backends:
Alcotest.Unix -> Alcotest.Unix_platformAlcotest_engine.{Cli,Core,Test} -> Alcotest_engine.V1.{Cli,Core,Test}Alcotest.{Cli,Core} are now gone. Use Alcotest_engine.V1.{Cli,Core}.Make (Alcotest.Unix_platform) instead. (#306 #309, @CraigFe)list_tests in the main test APIs (Alcotest{,_lwt,_async}). Use Alcotest_engine directly if you want this function. (#310, @CraigFe)?here and ?pos arguments to the test assertion functions. These can be used to pass information about the location of the call-site, which is displayed in failing test output. (#291, @CraigFe)Alcotest.check and related functions. This allows them to be used outside of an Alcotest test runner for making general assertions. (#296, @CraigFe)--bail option (and corresponding ALCOTEST_BAIL environment variable), which causes Alcotest to terminate after the first test failure. (#298, @CraigFe)Alcotest.triple for testing 3-tuples. (#288, @sheepduke)~and_exit:false option when the test suite fails. (#271, @CraigFe)fmt.0.8.8+dune by adding a missing fmt dependency in alcotest's dune file (#266, @NathanReb). characters to appear unescaped in symlinks and test directories. (#259, @CraigFe)alcotest-mirage package, allowing the construction of MirageOS unikernels that run Alcotest test suites. (#238, @hannesm @linse)Alcotest.check', a variant of Alcotest.check with labeled arguments. (#239, @hartmut27)bytes type. (#253, @mefyl)--color=always when running inside Dune (#242, @CraigFe). The value can be overridden by setting the ALCOTEST_COLOR variable in a dune file, for example:(env
(_
(env-vars
(ALCOTEST_COLOR auto))))Alcotest_{async,lwt}.run. (#222, @CraigFe)ALCOTEST_COLOR={auto,always,never} environment variable to control the colorization of terminal output. (#209, @mjambon)Alcotest_{async,lwt}. (#212, @CraigFe @talex5)Alcotest_{async,lwt}.test_case to return monadic values. These must be run with the new Alcotest_{async,lwt}.run functions. See examples/lwt/test.ml for an example of the new API. (#167, @CraigFe)latest symlinks in the _test directory which point to the most recent test output directory. (#155, @cfcs)Alcotest.{run,run_with_args} without use of the argv parameter. (#182, @CraigFe)--compact option for more concise result reporting. (#149, @andersfugmann)--tail-errors option for limiting the size of error logs printed to standard output. (#200, @mjambon)test subcommand. (#158, @CraigFe)float check to include equality of isNaN and infinities. See examples/floats.ml for demonstrations of the new semantics. (#152, @psafont)?argv parameter. (#164, @ian-barnes)tput. (#189, @samoht)Pervasives.compare. (#173, @CraigFe)Async support: there is a new alcotest-async package containing an Alcotest_async module (#104, @rgrinberg)failf (#105, @hcarty)float combinator to compare its epsilon using <= instead of <. This allows to use float 0. for "exact" float comparison (#107, @samoht, @talex5)--verbose. Be clearer that no new output logs are actually created and do not try to display outdated information (#108, @samoht)float combinator to take a mandatory 'epsilon' parameter (#89, @superbobry)test_case function (#94, @samoht)alcotest-lwt package, containing an Alcotet_lwt module with an Alcotest_lwt.test_case function to better deal with lwt tests (#94, @talex5, @samoht)Alcotest.neg to negate test results (#95, @samoht)test_case type from unit -> unit to 'a -> unit. The 'a parameter can be built using as a Cmdliner term using the new run_with_args function. This is useful to configure the tests using the CLI (#96, @samoht)_build/_tests by default (#77, @pqwy)unit testable (useful for functions with side-effects) (#79, @avsm)testable combinator to easily build 'a testable values (#75, @pqwy)pp and equal to extract the pretty-printer and equality functions from an 'a testable (#75, @pqwy)array testable (#75, @pqwy)topkg (#68, @samoht)Alcotest.reject to always fail tests (#64, @talex5)Alcotest.list (#53, #65, @talex5)argv optional argument to run to use custom command-line arguments (#63, @dinosaure)Astring for the unit tests (#62, @hannesm)Alcotest.pass a testable combinator which always pass (#50, @seliopou)index out of bounds for empty test doc string (#51, @dariusf)--color flag to tweak color usage on the command-line and use Fmt (#52, #55, @samoht)check_raises (#48, by @yallop)Alcotest.bool (#33, by @zjhmale)Alcotest.slist (#34, by @samoht)Alcotest.pair (#34, by @samoht)Pervasive.compare and a pretty-printing function: Alcotest.of_pp (#34, by @samoht)Alcotest.check (#27, by @edwintorok)run function multiple times is much more consistent.OUnit. Programs using OUnit and Alcotest should continue to work.TESTABLE signature and a check function to check invariants in the tested libraries.--show-errors using the ALCOTEST_SHOW_ERRORS env variable (#9)and_exit optional argument to Alcotest.run to control the exit behavior of the main test function (#4)--version--json argument to show the test results as a JSON object (#14, by @eowzukw)Alcotest.result to turn a test into a resultBytes module instead of String