Version française
Home     About     Download     Resources     Contact us    
Browse thread
ANNOUNCE: TestSimple - A simple unit testing framework
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Stevan Little <stevan.little@i...>
Subject: ANNOUNCE: TestSimple - A simple unit testing framework
Hello all,

I would like to announce the first release of our new unit testing  
framework for OCaml. It can be downloaded from our website here:

http://www.iinteractive.com/ocaml/

It is based heavily on the Perl unit testing framework of the same  
name, and produces TAP output (http://en.wikipedia.org/wiki/ 
Test_Anything_Protocol) which can be read and analyzed by a wide  
range of existing Perl tools. The goal of this framework is to make  
writing unit tests as simple and as easy as possible (hence the  
name). Here is a basic example taken from the TestSimple test suite  
itself.

     #use "topfind";;
     #require "testSimple";;

     open TestSimple;;

     plan 9;;

     diag "... testing O'Caml TestSimple v0.01 ";;
     ok true "... ok passed";;
     is 2 2 "... is <int> <int> passed";;
     is 2. 2. "... is <float> <float> passed";;
     is "foo" "foo" "... is <string> <string> passed";;
     is [] [] "... is <'a list> <'a list> passed";;
     is [1;2;3] [1;2;3] "... is <int list> <int list> passed";;
     is ["foo";"bar"] ["foo";"bar"] "... is <string list> <string  
list> passed";;
     is (1,"foo") (1,"foo") "... is <int * string> <int * string>  
passed";;
     is TAPDocument.Ok TAPDocument.Ok "... is <type> <type> passed";;

As this is our first released OCaml library, any and all feedback is  
very much appreciated.

Thanks,

Stevan Little

----------------------------------------
Senior Developer - Infinity Interactive
http://www.iinteractive.com/
----------------------------------------