Skip to content

Releases: mirage/alcotest

1.9.1

01 Oct 10:30

Choose a tag to compare

CHANGES:

  • Remove bad test with cmdliner to be compatible with cmdliner.2.0.0 (@MisterDA, #424)

1.9.0

13 Mar 09:13

Choose a tag to compare

CHANGES:

  • Add seq, a testable for Seq.t and contramap (#412 @xvw)
  • Expose the V1.Skip exception (#415, #416, @Khady)
  • BREAKING FIX: 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)

1.8.0

25 Jul 11:16

Choose a tag to compare

CHANGES:

  • Add match_raises, a generalized version of check_raises
    (#88, #386, @JoanThibault)

  • Update JaneStreet core and async to v0.16 (#390 @tmcgilchrist)

  • Fix division by zero when size of the terminal is incorrectly
    reported as zero. (fix #356, #381, @MisterDA)

  • Enable terminal size reporting on macOS and Windows. Also report the
    terminal size even when the test is run buffered by Dune.
    (#381, #396, @MisterDA)

  • Allow overriding the number of columns with ALCOTEST_COLUMNS env
    var. (#322, #381, @MisterDA)

  • Be able to allocate and use user's formatters for stdout/stderr
    (#399, @dinosaure)

  • Stop detecting ocamlci specifically, since there's nothing specific
    about it. Simply use the CI env var to detect CIs. Improve CI
    detection.
    (#397, @MisterDA)

1.7.0

24 Feb 18:00
927088f

Choose a tag to compare

CHANGES:

1.6.0

24 Jun 10:26

Choose a tag to compare

CHANGES:

  • Fix a bug when running test concurently. Alcotest could fail to
    output the content of the log file. (#353, @hhugo)

  • Require Cmdliner.1.1.0. (#339, @MisterDA)

  • Upgrade to async>=v0.15.0 (#352, @crackcomm)

1.5.0

09 Oct 18:11

Choose a tag to compare

CHANGES:

  • Make Alcotest compatible with 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 exception backtraces during test suite runs by default. This behaviour
    can be disabled by passing ~record_backtrace:false to Alcotest.run. (#317,
    @craigfe)

  • Generate shorter unique identifiers for test runs (8-character alphanumeric,
    rather than a full 128-bit UUID). (#304, @craigfe)

  • Change Alcotest.{char,string} pretty-printers to use OCaml syntax on
    assertion failures (i.e. wrap with quotes and escape control characters).
    (#318, @craigfe)

  • Fix process for getting the width of attached terminals on MacOS.
    Previously, a terminal width of 80 columns was assumed. (#325, @craigfe)

  • Fix parsing of test filter ranges to allow '-' separators (e.g. test alpha 1-4), as advertised in the manpage. The previously-used '..' separator is
    also supported. (#312, @craigfe)

  • Introduce an 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)

  • Change the ~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_platform
    • Alcotest_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)
  • Avoid exporting list_tests in the main test APIs (Alcotest{,_lwt,_async}).
    Use Alcotest_engine directly if you want this function. (#310, @craigfe)

1.4.0

15 Apr 09:22

Choose a tag to compare

CHANGES:

  • Add ?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)

  • Add a pretty-printer for the exception raised by Alcotest.check and related
    functions. This allows them to be used outside of an Alcotest test runner for
    making general assertions. (#296, @craigfe)

  • Add --bail option (and corresponding ALCOTEST_BAIL environment variable),
    which causes Alcotest to terminate after the first test failure. (#298,
    @craigfe)

1.3.0

16 Feb 21:37

Choose a tag to compare

CHANGES:

  • Add Alcotest.triple for testing 3-tuples. (#288, @sheepduke)

  • Correctly report test suite duration with millisecond precision. (#286,
    @craigfe)

  • Improve pretty-printing of results to consider the terminal width, fixing
    several display issues due to line wrapping in small terminals. (#282,
    @craigfe)

1.2.3

07 Sep 20:51

Choose a tag to compare

CHANGES:

  • Require Dune 2.2. (#274, @craigfe)

  • Fix a bug in the handling of the ~and_exit:false option when the test suite
    fails. (#271, @craigfe)

1.2.2

26 Aug 16:05
b16d4f5

Choose a tag to compare

CHANGES:

  • Fail gracefully when the user supplies an empty suite name. (#265, @craigfe)

  • Fix compatibility with fmt.0.8.8+dune by adding a missing fmt dependency
    in alcotest's dune file (#266, @NathanReb)

  • Only show "in progress" lines when writing to a TTY. (#267, @craigfe)