File: Alternative.hs

package info (click to toggle)
haskell-hedgehog-classes 0.2.5.4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 504 kB
  • sloc: haskell: 6,010; makefile: 5
file content (19 lines) | stat: -rw-r--r-- 400 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
module Spec.Alternative (testAlternative) where

import Hedgehog.Classes

import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.Range as Range

testAlternative :: [(String, [Laws])]
testAlternative =
  [ ("[]", lawsList)
  , ("Maybe", lawsMaybe)
  ]

lawsList :: [Laws]
lawsList = [alternativeLaws (Gen.list (Range.linear 0 6))]

lawsMaybe :: [Laws]
lawsMaybe = [alternativeLaws Gen.maybe]