on 1.4.4.0 help sign in
typeable/aeson/tests/PropertyKeys.hs
43 lines 1.7 kB history raw
1{-# LANGUAGE CPP #-}
2{-# LANGUAGE NoImplicitPrelude #-}
4module PropertyKeys ( keysTests ) where
6import Prelude.Compat
8import Data.Time (Day, LocalTime, TimeOfDay, UTCTime)
9import Data.Version (Version)
10import Instances ()
11import Numeric.Natural (Natural)
12import Test.Tasty (TestTree, testGroup)
13import Test.Tasty.QuickCheck (testProperty)
14import Types
15import qualified Data.Text as T
16import qualified Data.Text.Lazy as LT
17import qualified Data.UUID.Types as UUID
18import PropUtils
21keysTests :: TestTree
22keysTests =
23 testGroup "roundTrip Key"
24 [ testProperty "Bool" $ roundTripKey True
25 , testProperty "Text" $ roundTripKey (undefined :: T.Text)
26 , testProperty "String" $ roundTripKey (undefined :: String)
27 , testProperty "Int" $ roundTripKey (undefined :: Int)
28 , testProperty "[Text]" $ roundTripKey (undefined :: LogScaled [T.Text])
29 , testProperty "(Int,Char)" $ roundTripKey (undefined :: (Int,Char))
30 , testProperty "Integer" $ roundTripKey (undefined :: Integer)
31 , testProperty "Natural" $ roundTripKey (undefined :: Natural)
32 , testProperty "Float" $ roundTripKey (undefined :: Float)
33 , testProperty "Double" $ roundTripKey (undefined :: Double)
34#if MIN_VERSION_base(4,7,0)
35 , testProperty "Day" $ roundTripKey (undefined :: Day)
36 , testProperty "LocalTime" $ roundTripKey (undefined :: LocalTime)
37 , testProperty "TimeOfDay" $ roundTripKey (undefined :: TimeOfDay)
38 , testProperty "UTCTime" $ roundTripKey (undefined :: UTCTime)
39#endif
40 , testProperty "Version" $ roundTripKey (undefined :: Version)
41 , testProperty "Lazy Text" $ roundTripKey (undefined :: LT.Text)
42 , testProperty "UUID" $ roundTripKey UUID.nil
43 ]