package alcotest

All checked builds pass
  1. Overview
  2. Docs
Alcotest is a lightweight and colourful test framework

Install

dune-project
 Dependency

Authors

Maintainers

Sources

alcotest-1.10.2.tbz
sha256=6e0da8828fbf6826de0b782dfe32c45f9fee7a44f1d6257c697d0cf92cfecd36
sha512=fadb58647cb046624e54a08da873e1abdf56fedc3f5f6c9d91a851e4f83a688e451ba087e8100976bfcbe8d6374dd2e6db718f175483e0a825e0acba7be3a3d1

doc/alcotest.engine/Alcotest_engine/Formatters/index.html

Module Alcotest_engine.FormattersSource

Alcotest uses Format.std_formatter and Format.err_formatter formatters. However, in a parallel context (OCaml 5 and domains), using these values in parallel can lead to data-races, since these values are not domains-safe. As such, Alcotest offers a way to create your own formatter equivalent in behavior to Format.std_formatter and Format.err_formatter (i.e. they write well on 1 and 2) but they can be used without risk even if another library (such as Logs) uses Format.std_formatter and/or Format.err_formatter and is used in parallel.

Sourcetype stdout = private Format.formatter
Sourcetype stderr = private Format.formatter
Sourceval set_stdout : stdout -> unit
Sourceval set_stderr : stderr -> unit
Sourceval get_stdout : unit -> stdout
Sourceval get_stderr : unit -> stderr
Sourceval ocaml_stdout : stdout
Sourceval ocaml_stderr : stderr
Sourceval make_stdout : unit -> stdout
Sourceval make_stderr : unit -> stderr
Sourceval pr : ('a, Format.formatter, unit) format -> 'a
Sourceval epr : ('a, Format.formatter, unit) format -> 'a