on dev help sign in
test changes
commit510539617fe08fdc8d250a416fa4b5764fe60a0e authorEitan Chatav <eitan@EEM109LMBP-1.local> dateMon 15 Jul 2019, 09:17 (7 years ago) parent1e3cf9f
1 file changed+9−8
squeal-postgresql/test/Specs/Binary.hs+9−8
squeal-postgresql/test/Specs/Binary.hs+9−8
@@ -19,12 +19,13 @@ import qualified Hedgehog.Range as Range
1919
2020roundtrips :: IO ()
2121roundtrips = Main.defaultMain
22− [ check $ roundtrip int2 (Gen.int16 Range.constantBounded)
23− , check $ roundtrip int4 (Gen.int32 Range.constantBounded)
24− , check $ roundtrip int8 (Gen.int64 Range.constantBounded)
25− , check $ roundtrip bool Gen.bool
26− , check $ roundtrip numeric (scientific (Range.exponentialFloatFrom 0 (-1E9) 1E9))
27− , check $ roundtrip float4 (Gen.float (Range.exponentialFloatFrom 0 (-1E9) 1E9))
22+ [ roundtrip int2 (Gen.int16 Range.exponentialBounded)
23+ , roundtrip int4 (Gen.int32 Range.exponentialBounded)
24+ , roundtrip int8 (Gen.int64 Range.exponentialBounded)
25+ , roundtrip bool Gen.bool
26+ , roundtrip numeric (scientific (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))
2829 ]
2930 where
3031 scientific = fmap fromFloatDigits . Gen.float
@@ -36,8 +37,8 @@ roundtrip
3637 :: (ToParam x ty, FromValue ty x, Show x, Eq x)
3738 => TypeExpression schemas ('NotNull ty)
3839 -> Gen x
39− -> Property
40−roundtrip ty gen = property $ do
40+ -> IO Bool
41+roundtrip ty gen = check . property $ do
4142 x <- forAll gen
4243 Just (Only y) <- lift . withConnection connectionString $
4344 firstRow =<< runQueryParams