chell: A simple and intuitive library for automated testing.

[ library, mit, testing ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Modules

[Index] [Quick Jump]

Flags

Automatic Flags
NameDescriptionDefault
color-output

Enable colored output in test results

Enabled

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

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 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, 0.5, 0.5.0.1, 0.5.0.2
Change log changelog.md
Dependencies ansi-terminal (>=1.0 && <1.2), base (>=4.16 && <4.22), bytestring (>=0.11.4 && <0.13), options (>=1.2.1 && <1.3), patience (>=0.3 && <0.4), random (>=1.2.1 && <1.3), template-haskell (>=2.18 && <2.23), text (>=1.2.5 && <1.3 || >=2.0 && <2.2), transformers (>=0.5.6 && <0.7) [details]
Tested with ghc ==9.12.0, ghc ==9.10.1, ghc ==9.8.2, ghc ==9.6.6, ghc ==9.4.8, ghc ==9.2.8
License MIT
Author John Millikin <john@john-millikin.com>
Maintainer Chris Martin, Julie Moronuki
Revised Revision 2 made by AndreasAbel at 2024-11-13T16:42:29Z
Category Testing
Home page https://github.com/typeclasses/chell
Uploaded by chris_martin at 2023-07-11T21:34:02Z
Distributions Arch:0.5.0.1, Debian:0.5, NixOS:0.5.0.2, Stackage:0.5.0.2
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 21367 total (71 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for chell-0.5.0.2

[back to package description]

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 arithmetic operators.

{-# LANGUAGE TemplateHaskell #-}

import Test.Chell

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

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

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

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