diff options
author | defanor <defanor@uberspace.net> | 2017-12-16 11:14:08 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2017-12-16 11:14:08 +0300 |
commit | 10958faa61301446a980ea93cb2e77287b51a225 (patch) | |
tree | b5e111b0bed3278c8d783f0490e88037ed6d1bd5 /test | |
parent | fa15e16722ece1b429a6f45d6f57d77e528fe825 (diff) |
Add more instances
Numeric and date/time types.
Diffstat (limited to 'test')
-rw-r--r-- | test/Test.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Test.hs b/test/Test.hs index 9b92993..4d965c9 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -6,6 +6,8 @@ import Test.Tasty import Test.Tasty.QuickCheck as QC import Data.Proxy import Test.Tasty.Travis +import Data.Word +import Data.Int import Coalpit @@ -22,14 +24,14 @@ data Record = Record { maybeInt :: Maybe Int , maybeDouble :: Maybe Double , str :: String , listOfStrings :: [String] - , maybeListOfNumbers :: Maybe [Integer] + , maybeNonEmptyListOfNumbers :: Maybe [Integer] , otherString :: String } deriving (Generic, Eq, Show, Coalpit) instance Arbitrary Record where arbitrary = genericArbitraryU data Sum = Foo Int Bool | Bar - | Baz (String, (Double, Integer), Rational) + | Baz (Int8, (Float, Word16), Rational) deriving (Generic, Eq, Show, Coalpit) instance Arbitrary Sum where arbitrary = genericArbitraryU @@ -56,7 +58,7 @@ instance Arbitrary NestedRecord where arbitrary = genericArbitraryU data NestedSum = NestedFoo Record | NestedBar Sum Basic Nested - | NestedBaz (Polymorphic Int Double) + | NestedBaz (Polymorphic Char Double) deriving (Generic, Eq, Show, Coalpit) instance Arbitrary NestedSum where arbitrary = genericArbitraryU |