package ppx_inline_test

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val am_running : bool

am_running is true if the code is running inline tests (e.g. let%expect_test, let%test, let%test_unit) or is in an executable invoked from inline tests.

val am_running_env_var : string
val testing : [ `Not_testing | `Testing of [ `Am_test_runner | `Am_child_of_test_runner ] ]

`Am_test_runner means the ./inline_tests_runner process, whereas `Am_child_of_test_runner means a process descended from the test runner.

val init : string list -> (string option, string) Stdlib.result

The tests to run are configured by command line arguments, normally pulled from Sys.argv. Calling init will re-configure the test runner using the passed-in argument list. This is useful to run tests in a dynamically loaded library; this should be called with the appropriate configuration before loading the library.

init will normally return None. It will return an error if there's a formatting error in the arguments, and will return Some string if help was requested. It will also return an error if the test runner has already initialized, either by reading command-line arguments or by a previous call to init.

OCaml

Innovation. Community. Security.