Project

smlspec

0.0
No commit activity in last 3 years
No release in over 3 years
Gem for running tests in SML files
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

>= 0
 Project Readme

SMLspec

SML spec is a test runner for Standard ML. It lets you write very concise and short tests and still get a useful and pretty output.

Install

  1. Install Moscow ML.
  2. Install the gem with gem install smlspec.

Example

Write some SML code like this

fun myLength [] = 0
  | myLength (_::xs) = 1 + myLength xs

val myLength_test1 = myLength [] = 0
val myLength_test2 = myLength [1, 2] = 2
val myLength_test3 = myLength ["a", "b", "c"] = 3

Then run smlspec <name of file>.sml

And you'll get output similar to this

...

3 tests ran, 0 red, 3 green

If you have failed tests you'll see something like this

...F


myLength_test4


4 tests ran, 1 red, 3 green