@@ -19,12 +19,13 @@ import qualified Hedgehog.Range as Range
20roundtrips :: IO ()
20roundtrips :: IO ()
21roundtrips = Main.defaultMain
21roundtrips = Main.defaultMain
22− [ check $ roundtrip int2 (Gen.int16 Range.constantBounded)
22+ [ roundtrip int2 (Gen.int16 Range.exponentialBounded)
23− , check $ roundtrip int4 (Gen.int32 Range.constantBounded)
23+ , roundtrip int4 (Gen.int32 Range.exponentialBounded)
24− , check $ roundtrip int8 (Gen.int64 Range.constantBounded)
24+ , roundtrip int8 (Gen.int64 Range.exponentialBounded)
25− , check $ roundtrip bool Gen.bool
25+ , roundtrip bool Gen.bool
26− , check $ roundtrip numeric (scientific (Range.exponentialFloatFrom 0 (-1E9) 1E9))
26+ , roundtrip numeric (scientific (Range.exponentialFloatFrom 0 (-1E9) 1E9))
27− , check $ roundtrip float4 (Gen.float (Range.exponentialFloatFrom 0 (-1E9) 1E9))
27+ , roundtrip float4 (Gen.float (Range.exponentialFloatFrom 0 (-1E9) 1E9))
28+ , roundtrip float8 (Gen.double (Range.exponentialFloatFrom 0 (-1E308) 1E308))
30 scientific = fmap fromFloatDigits . Gen.float
31 scientific = fmap fromFloatDigits . Gen.float
@@ -36,8 +37,8 @@ roundtrip
36 :: (ToParam x ty, FromValue ty x, Show x, Eq x)
37 :: (ToParam x ty, FromValue ty x, Show x, Eq x)
37 => TypeExpression schemas ('NotNull ty)
38 => TypeExpression schemas ('NotNull ty)
39− -> Property
40+ -> IO Bool
40−roundtrip ty gen = property $ do
41+roundtrip ty gen = check . property $ do
41 x <- forAll gen
42 x <- forAll gen
42 Just (Only y) <- lift . withConnection connectionString $
43 Just (Only y) <- lift . withConnection connectionString $
43 firstRow =<< runQueryParams
44 firstRow =<< runQueryParams