package ppx_inline_test

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module Test_result : sig ... end
type config = (module Inline_test_config.S)
type 'a test_function_args = config:config -> descr:string -> tags:string list -> filename:string -> line_number:int -> start_pos:int -> end_pos:int -> 'a
val set_lib_and_partition : string -> string -> unit
val unset_lib : string -> unit
val test : ((unit -> bool) -> unit) test_function_args
val test_unit : ((unit -> unit) -> unit) test_function_args
val test_module : ((unit -> unit) -> unit) test_function_args
val summarize : unit -> Test_result.t
  • deprecated [since 2016-04] use add_evaluator instead
val collect : (unit -> unit) -> (unit -> unit) list

These values are meant to be used inside a user's tests.

val testing : bool
val use_color : bool
val in_place : bool
val diff_command : string option
val source_tree_root : string option
val allow_output_patterns : bool

Allow patterns in tests expectation

val am_running_inline_test : bool

am_running_inline_test 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. The latter is arranged by setting an environment variable, see Core.Am_running_inline_test.

val am_running_inline_test_env_var : string
val add_evaluator : f:(unit -> Test_result.t) -> unit

Record an evaluator for an external set of tests

val exit : unit -> _

Exit with a status based on the combined result of all recorded evaluators

OCaml

Innovation. Community. Security.