{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} module Test.Cardano.Ledger.Shelley.Binary.GoldenSpec (spec) where import Cardano.Ledger.Shelley import Paths_cardano_ledger_shelley (getDataFileName) import Test.Cardano.Ledger.Common import Test.Cardano.Ledger.Core.JSON (goldenJsonPParamsSpec, goldenJsonPParamsUpdateSpec) import Test.Cardano.Ledger.Shelley.Arbitrary () import Test.Cardano.Ledger.Shelley.Binary.Golden (goldenNewEpochStateExpectation) import Test.Cardano.Ledger.Shelley.Era () spec :: Spec spec :: Spec spec = String -> Spec -> Spec forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "Golden" (Spec -> Spec) -> Spec -> Spec forall a b. (a -> b) -> a -> b $ do String -> (NewEpochState ShelleyEra -> Expectation) -> Spec forall prop. (HasCallStack, Testable prop) => String -> prop -> Spec prop String "NewEpochState" ((NewEpochState ShelleyEra -> Expectation) -> Spec) -> (NewEpochState ShelleyEra -> Expectation) -> Spec forall a b. (a -> b) -> a -> b $ forall era. (HasCallStack, EraTxOut era, EraGov era, EraStake era, ToCBOR (StashedAVVMAddresses era), EncCBOR (StashedAVVMAddresses era), EraCertState era) => NewEpochState era -> Expectation goldenNewEpochStateExpectation @ShelleyEra IO String -> SpecWith String -> Spec forall a. HasCallStack => IO a -> SpecWith a -> Spec beforeAll (String -> IO String getDataFileName String "golden/pparams.json") (SpecWith String -> Spec) -> SpecWith String -> Spec forall a b. (a -> b) -> a -> b $ forall era. EraPParams era => SpecWith String goldenJsonPParamsSpec @ShelleyEra IO String -> SpecWith String -> Spec forall a. HasCallStack => IO a -> SpecWith a -> Spec beforeAll (String -> IO String getDataFileName String "golden/pparams-update.json") (SpecWith String -> Spec) -> SpecWith String -> Spec forall a b. (a -> b) -> a -> b $ forall era. EraTest era => SpecWith String goldenJsonPParamsUpdateSpec @ShelleyEra