{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module Test.Cardano.Ledger.Conway.GoldenTranslation (
spec,
)
where
import Cardano.Ledger.Conway (ConwayEra)
import Paths_cardano_ledger_conway (getDataFileName)
import Test.Cardano.Ledger.Alonzo.Translation.Golden (assertTranslationResultsMatchGolden)
import Test.Cardano.Ledger.Common
import Test.Cardano.Ledger.Conway.Translation.TranslatableGen ()
import Test.HUnit (Assertion)
spec :: Spec
spec :: Spec
spec =
forall a. HasCallStack => String -> SpecWith a -> SpecWith a
describe String
"Golden translation tests" forall a b. (a -> b) -> a -> b
$
forall a.
(HasCallStack, Example a) =>
String -> a -> SpecWith (Arg a)
it String
"golden/translation.cbor" forall a b. (a -> b) -> a -> b
$
String -> Assertion
check String
"golden/translations.cbor"
check :: String -> Assertion
check :: String -> Assertion
check String
file = forall era.
(TranslatableGen era, Show (ContextError era), HasCallStack) =>
IO String -> Assertion
assertTranslationResultsMatchGolden @ConwayEra (String -> IO String
getDataFileName String
file)