[Caml-list] ANNOUNCE: TestSimple - A simple unit testing framework

3 views
Skip to first unread message

Stevan Little

unread,
Jan 27, 2007, 8:16:27 PM1/27/07
to Caml List
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/
----------------------------------------

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply all
Reply to author
Forward
0 new messages