package ppx_inline_test
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b71e4f01ab8aed418a3358688241a94b6d16d723deec7caaf5e4e917c2a76d2c
doc/ppx_inline_test.runtime-lib/Ppx_inline_test_lib/index.html
Module Ppx_inline_test_libSource
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.
`Am_test_runner means the ./inline_tests_runner process, whereas `Am_child_of_test_runner means a process descended from the test runner.
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.