@@ -1,5 +1,7 @@
1{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-}
1{-# LANGUAGE OverloadedStrings, RecordWildCards, ScopedTypeVariables #-}
3+module Properties (encoderComparisonTests, tests) where
3import Control.Monad (forM)
5import Control.Monad (forM)
4import Data.Aeson (eitherDecode)
6import Data.Aeson (eitherDecode)
5import Data.Aeson.Encode
7import Data.Aeson.Encode
@@ -90,11 +92,6 @@ sameAsV :: (a -> Value) -> (a -> Encoding) -> a -> Property
90sameAsV toVal toEnc v =
92sameAsV toVal toEnc v =
91 eitherDecode (toLazyByteString (fromEncoding (toEnc v))) === Right (toVal v)
93 eitherDecode (toLazyByteString (fromEncoding (toEnc v))) === Right (toVal v)
95− comparisonTest <- encoderComparisonTests
96− defaultMain (comparisonTest : tests)
98type P6 = Product6 Int Bool String (Approx Double) (Int, Approx Double) ()
95type P6 = Product6 Int Bool String (Approx Double) (Int, Approx Double) ()
99type S4 = Sum4 Int8 ZonedTime T.Text (Map.Map String Int)
96type S4 = Sum4 Int8 ZonedTime T.Text (Map.Map String Int)