File: microspec.cabal

package info (click to toggle)
haskell-microspec 0.2.1.3-6
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 64 kB
  • sloc: haskell: 219; makefile: 5
file content (57 lines) | stat: -rw-r--r-- 1,694 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name:                microspec
version:             0.2.1.3
synopsis:            Tiny QuickCheck test library with minimal dependencies
description:         
  A tiny (1 module, <500 lines) property-based (and unit) testing library with minimal dependencies.
  .
  Instead of reinventing the wheel (<https://xkcd.com/927>), we use a
  RSpec/HSpec-like DSL and run tests with QuickCheck.
  .
  For many use-cases, microspec is a drop-in replacement for hspec.
  .
  > import Test.Microspec
  > 
  > main :: IO ()
  > main = microspec $ do
  >    describe "replicate" $ do
  >       it "doubles with 2" $
  >          replicate 2 'x' === "xx"
  >       it "creates a list of the right size" $
  >          \(Positive n) -> length (replicate n 'x') === n
  > 
  >    describe "reverse" $ do
  >       it "reverse . reverse === id" $ \l ->
  >          reverse (reverse l) === (l :: [Int])
  > 
  >    describe "tail" $
  >       it "length is -1" $ \(NonEmpty l) ->
  >          length (tail l :: [Int]) === length l - 1
  > 
  >    describe "solve the halting problem" $
  >       pending
license:             BSD3
license-file:        LICENSE
author:              Tom Murphy
maintainer:          Tom Murphy
-- copyright:           
category:            Test, Testing
build-type:          Simple
cabal-version:       >=1.10
stability:           experimental

library
  exposed-modules:
    Test.Microspec
  -- other-modules:       
  other-extensions:
      FlexibleInstances
    , LambdaCase
  build-depends:
      -- PVP compat:
    --   base >=4.9 && <5
    -- , QuickCheck >=2.9 && <2.10
      base <5
    , time
    , QuickCheck
  -- hs-source-dirs:      
  default-language:    Haskell2010