[tap-l] Tap module for Haskell
Patrick LeBoutillier
patrick.leboutillier at gmail.com
Mon Mar 9 14:33:17 GMT 2009
Hi all,
I've written a small Haskell module that produces TAP. It's based on
libtap, here is a quick example:
import TAP
main = runTests $ do
planTests 6
let name = "Arthur Dent"
let answer = 42
let question = "Unknown"
is answer 42 $ Just "The Answer to Life, the Universe, and Everything"
like question "no" Nothing
skip 1 "for Marvin"
skipIf (name == "Arthur Dent") 2 "Arthur Ok" $ do
pass $ Just "Freebie"
TAP.fail Nothing -- conflicts with Prelude.fail
toDo "in 10 millions years" $ do
diag "check question"
is question "answered" $ Just "wondering"
I've inserted the appropriate link in the TAP-Producers page in the
wiki, and here are the details:
http://testanything.org/wiki/index.php/HaskellTapModule
All comments are welcome, especially since this is my first haskell module.
Thanks a lot,
Patrick
--
=====================
Patrick LeBoutillier
Rosemère, Québec, Canada
More information about the tap-l
mailing list