package awsm

  1. Overview
  2. Docs

Utility functions for writing tests.

val pass : string -> (string * string) list -> unit

pass msg alist prints a message to stdout indicating that a test passed by printing "OK". The msg should state what the test was, and the association list alist should provide the names and values of items needed to understand the test.

It is recommended that msg be a constant and not depend on any values specific to the test, which should instead be provided in alist. This makes it easier to process tests that need to be robust to different environments. This may not be relevant for unit tests which are likely independent of any environment or context, but following this guideline nonetheless leads to consistent expect test formatting.

val fail : string -> (string * string) list -> unit

fail msg alist is similar to pass but prints "FIXME" to indicate the test failed and thus needs to be fixed.

OCaml

Innovation. Community. Security.