package ounit2-lwt

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module OUnitLwtSource

Helper to write Lwt tests with OUnit.

As of 2019-09-19, this module is still experimental.

Sourceval lwt_wrapper : ('a -> 'b Lwt.t) -> 'a -> 'b

lwt_wrapper f transforms an Lwt function into a test.

Example:

let test =
  "SimpleAssertion" >::
  (lwt_wrapper
     (fun ctxt ->
        Lwt.return 4
        >>= fun i ->
        Lwt.return (assert_equal ~ctxt 4 i)))
OCaml

Innovation. Community. Security.