Module B0_testing

Simple testing tools.

module Test : sig ... end

Testing structure and combinators.

module Test_fmt : sig ... end

Formatters for test runners.

Example

open B0_testing

let test_string_get () =
  Test.test "String.get" @@ fun () ->
  Test.invalid_arg @@ (fun () -> String.get "" 1));
  assert (String.get "a" 1 = 'a');
  ()

let test_string_append () =
  Test.test "String.append" @@ fun () ->
  assert (String.append "a" "b" = "ab");
  ()

let main () =
  Test.main @@ fun () ->
  test_string_append ();
  ()

let () = if !Sys.interactive then exit (main ())