HTTPS SSH

UnitTestML

A unit test support for Standard ML using MLton.

Running tests

git clone git@bitbucket.org:cacilhas/unittestml.git
cd unittestml/
mlton tests/test.mlb
./tests/test

Installing

Install Smackage in order to manage your libs.

With Smackage installed, add UnitTestML to it and install:

smackage source UnitTestML git https://bitbucket.org/cacilhas/unittestml.git
smackage refresh
smackage get UnitTestML

Usage

Create a subdirectory tests/ inside your code’s root directory containing the following MLBasis:

(* tests/test.mlb *)
local
  $(SML_LIB)/basis/basis.mlb
  $(SMACKAGE)/UnitTestML/v1/unittest.mlb
  (* Your project’s MLBasis file here *)
in
  (*
   * Reference the spec files inside tests/ here
   *)
end

The file specs.sml in this very repository is a usage example: create a describe spec in each spec file containing other describe specs or tests (it fun) themselves.

For code consistency, we recommend using the "allowOptSemicolon true" ann. See test.mlb for an example.