The chell package

[ Tags: library, mit, testing ] [ Propose Tags ]

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

Versions 0.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, 0.4.0.1, 0.4.0.2
Dependencies ansi-terminal (==0.5.*), base (>=4.1 && <4.5 || >=4.6 && <4.8), bytestring (>=0.9), options (==0.1.*), patience (==0.1.*), random (>=1.0), system-filepath (==0.4.*), template-haskell (>=2.3), text (>=0.7), transformers (>=0.2) [details]
License MIT
Author John Millikin <jmillikin@gmail.com>
Maintainer John Millikin <jmillikin@gmail.com>
Category Testing
Home page https://john-millikin.com/software/chell/
Bug tracker mailto:jmillikin@gmail.com
Source repository head: 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.4
Uploaded Wed May 23 02:15:06 UTC 2012 by JohnMillikin
Updated Tue Jan 13 07:50:32 UTC 2015 by HerbertValerioRiedel to revision 2   [What is this?]
Distributions Debian:0.4.0.1, NixOS:0.4.0.2, Stackage:0.4.0.2, Tumbleweed:0.4.0.2
Downloads 9571 total (2366 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Successful builds reported [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
color-output

Enable colored output in test results

EnabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees