{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE BlockArguments #-}
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeFamilies #-}
module Test.Cardano.Ledger.Babbage.GoldenTranslation (
spec,
)
where
import Cardano.Ledger.Babbage (Babbage)
import Paths_cardano_ledger_babbage (getDataFileName)
import Test.Cardano.Ledger.Alonzo.Translation.Golden (assertTranslationResultsMatchGolden)
import Test.Cardano.Ledger.Babbage.Translation.TranslatableGen ()
import Test.Cardano.Ledger.Common
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 @Babbage (String -> IO String
getDataFileName String
file)