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
|
{-# LANGUAGE NoImplicitPrelude #-}
module Properties (module Properties) where
import Prelude.Compat
import Instances ()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Test.QuickCheck (Property)
import PropUtils
import PropertyGeneric
import PropertyKeys
import PropertyQC
import PropertyRoundTrip
import PropertyTH
tests :: TestTree
tests = testGroup "properties" [
testGroup "encode"
[ testProperty "encodeDouble" encodeDouble
, testProperty "encodeInteger" encodeInteger
]
, testProperty "read . show = id" roundtripReadShow
, roundTripTests
, keysTests
, testGroup "toFromJSON" [
testProperty "Integer" (toFromJSON :: Integer -> Property)
, testProperty "Double" (toFromJSON :: Double -> Property)
, testProperty "Maybe Integer" (toFromJSON :: Maybe Integer -> Property)
, testProperty "Either Integer Double" (toFromJSON :: Either Integer Double -> Property)
, testProperty "Either Integer Integer" (toFromJSON :: Either Integer Integer -> Property)
]
, testGroup "failure messages" [
testProperty "modify failure" modifyFailureProp
, testProperty "parserThrowError" parserThrowErrorProp
, testProperty "parserCatchError" parserCatchErrorProp
]
, genericTests
, templateHaskellTests
, quickcheckTests
]
|