git.iko.soy/typeable/generic-arbitrary
on master help sign in
24 lines 600 B history raw
1#if __GLASGOW_HASKELL__ >= 806 && __GLASGOW_HASKELL__ <= 900
2{-# OPTIONS_GHC -fconstraint-solver-iterations=5 #-}
3#elif __GLASGOW_HASKELL__ >= 902
4{-# OPTIONS_GHC -fconstraint-solver-iterations=6 #-}
5#endif
9module EnumTest where
11import Control.DeepSeq
12import GHC.Generics
13import Test.QuickCheck
14import Test.QuickCheck.Arbitrary.Generic
16data Country = PL | GB | RU | RO | CZ | HR | SK | DE | NL | ES | BR
17 deriving (Generic, NFData, Show)
19instance Arbitrary Country where
20 arbitrary = genericArbitrary
21 shrink = genericShrink
23prop_CountryTest :: Country -> Property
24prop_CountryTest = total