The chell package

[Tags: library, mit]

Chell is a simple and intuitive library for automated testing. It natively supports assertion-based testing, and can use companion libraries such as chell-quickcheck to support more complex testing strategies.

An example test suite, which verifies the behavior of artithmetic operators.

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TemplateHaskell #-}

import Test.Chell

test_Math :: Suite
test_Math = suite "math" [test_Addition, test_Subtraction]

test_Addition :: Suite
test_Addition = assertions "addition" $ do
    $expect (equal (2 + 1) 3)
    $expect (equal (1 + 2) 3)

test_Subtraction :: Suite
test_Subtraction = assertions "subtraction" $ do
    $expect (equal (2 - 1) 1)
    $expect (equal (1 - 2) (-1))

main :: IO ()
main = defaultMain [test_Math]
$ ghc --make chell-example.hs
$ ./chell-example
PASS: 2 tests run, 2 tests passed

Properties

Versions0.1, 0.1.1, 0.1.2, 0.1.3, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3, 0.3.1, 0.3.2, 0.3.3, 0.4
Dependenciesbase (>=4.1 && <5.0), bytestring (>=0.9), patience (==0.1.*), random (>=1.0), template-haskell (>=2.3), text (>=0.7), transformers (>=0.2)
LicenseMIT
AuthorJohn Millikin <jmillikin@gmail.com>
MaintainerJohn Millikin <jmillikin@gmail.com>
CategoryTesting
Home pagehttps://john-millikin.com/software/chell/
Bug trackermailto:jmillikin@gmail.com
Source repositoryhead: bzr branch https://john-millikin.com/branches/chell/0.2/
this: bzr branch https://john-millikin.com/branches/chell/0.2/ -r chell_0.2.3
Upload dateSun May 6 22:56:42 UTC 2012
Uploaded byJohnMillikin
DistributionsDebian:0.4, NixOS:0.4
Downloads994 total (129 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees