From 10958faa61301446a980ea93cb2e77287b51a225 Mon Sep 17 00:00:00 2001 From: defanor Date: Sat, 16 Dec 2017 11:14:08 +0300 Subject: Add more instances Numeric and date/time types. --- test/Test.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test') 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 -- cgit v1.2.3