1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
|
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE TypeApplications #-}
module PropertyRTFunctors ( roundTripFunctorsTests ) where
import Prelude.Compat
import Data.Functor.Compose (Compose (..))
import Instances ()
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.QuickCheck (testProperty)
import Types
import PropUtils
roundTripFunctorsTests :: TestTree
roundTripFunctorsTests =
testGroup "functors"
[ testProperty "Identity Char" $ roundTripEq @(I Int)
, testProperty "Identity Char" $ roundTripEq @(I Char)
, testProperty "Identity [Char]" $ roundTripEq @(I String)
, testProperty "[Identity Char]" $ roundTripEq @([I Char])
, testProperty "Compose I I Int" $ roundTripEq @(LogScaled (Compose I I Int))
, testProperty "Compose [] I Int" $ roundTripEq @(LogScaled (Compose [] I Int))
, testProperty "Compose I [] Int" $ roundTripEq @(LogScaled (Compose I [] Int))
, testProperty "Compose [] [] Int" $ roundTripEq @(LogScaled (Compose [] [] Int))
, testProperty "Compose I I Char" $ roundTripEq @(LogScaled (Compose I I Char))
, testProperty "Compose [] I Char" $ roundTripEq @(LogScaled (Compose [] I Char))
, testProperty "Compose I [] Char" $ roundTripEq @(LogScaled (Compose I [] Char))
, testProperty "Compose [] [] Char" $ roundTripEq @(LogScaled (Compose [] [] Char))
, testProperty "Compose3 I I I Char" $ roundTripEq @(LogScaled (Compose3 I I I Char))
, testProperty "Compose3 I [] I Char" $ roundTripEq @(LogScaled (Compose3 I [] I Char))
, testProperty "Compose3 I I [] Char" $ roundTripEq @(LogScaled (Compose3 I I [] Char))
, testProperty "Compose3 I [] [] Char" $ roundTripEq @(LogScaled (Compose3 I [] [] Char))
, testProperty "Compose3 [] I I Char" $ roundTripEq @(LogScaled (Compose3 [] I I Char))
, testProperty "Compose3 [] [] I Char" $ roundTripEq @(LogScaled (Compose3 [] [] I Char))
, testProperty "Compose3 [] I [] Char" $ roundTripEq @(LogScaled (Compose3 [] I [] Char))
, testProperty "Compose3 [] [] [] Char" $ roundTripEq @(LogScaled (Compose3 [] [] [] Char))
, testProperty "Compose3' I I I Char" $ roundTripEq @(LogScaled (Compose3' I I I Char))
, testProperty "Compose3' I [] I Char" $ roundTripEq @(LogScaled (Compose3' I [] I Char))
, testProperty "Compose3' I I [] Char" $ roundTripEq @(LogScaled (Compose3' I I [] Char))
, testProperty "Compose3' I [] [] Char" $ roundTripEq @(LogScaled (Compose3' I [] [] Char))
, testProperty "Compose3' [] I I Char" $ roundTripEq @(LogScaled (Compose3' [] I I Char))
, testProperty "Compose3' [] [] I Char" $ roundTripEq @(LogScaled (Compose3' [] [] I Char))
, testProperty "Compose3' [] I [] Char" $ roundTripEq @(LogScaled (Compose3' [] I [] Char))
, testProperty "Compose3' [] [] [] Char" $ roundTripEq @(LogScaled (Compose3' [] [] [] Char))
]
|