module Test.Cardano.Ledger.Shelley.ShelleyTranslation (testGroupShelleyTranslation) where import Cardano.Ledger.Shelley (ShelleyEra) import Cardano.Ledger.Shelley.AdaPots (totalAdaES) import Cardano.Ledger.Shelley.LedgerState (EpochState, returnRedeemAddrsToReserves) import Test.Cardano.Ledger.Shelley.Generator.ShelleyEraGen () import Test.Cardano.Ledger.Shelley.Serialisation.EraIndepGenerators () import Test.Cardano.Ledger.Shelley.Serialisation.Generators () import Test.Tasty import Test.Tasty.QuickCheck testGroupShelleyTranslation :: TestTree testGroupShelleyTranslation :: TestTree testGroupShelleyTranslation = TestName -> [TestTree] -> TestTree testGroup TestName "Translation from Shelley to Allegra" [ TestName -> (EpochState ShelleyEra -> Property) -> TestTree forall a. Testable a => TestName -> a -> TestTree testProperty TestName "returning redeemers preserves ada" EpochState ShelleyEra -> Property propRemoveRedeemPreservesAda ] propRemoveRedeemPreservesAda :: EpochState ShelleyEra -> Property propRemoveRedeemPreservesAda :: EpochState ShelleyEra -> Property propRemoveRedeemPreservesAda EpochState ShelleyEra es = EpochState ShelleyEra -> Coin forall era. (EraTxOut era, EraGov era, EraCertState era) => EpochState era -> Coin totalAdaES EpochState ShelleyEra es Coin -> Coin -> Property forall a. (Eq a, Show a) => a -> a -> Property === (EpochState ShelleyEra -> Coin forall era. (EraTxOut era, EraGov era, EraCertState era) => EpochState era -> Coin totalAdaES (EpochState ShelleyEra -> Coin) -> (EpochState ShelleyEra -> EpochState ShelleyEra) -> EpochState ShelleyEra -> Coin forall b c a. (b -> c) -> (a -> b) -> a -> c . EpochState ShelleyEra -> EpochState ShelleyEra forall era. EraTxOut era => EpochState era -> EpochState era returnRedeemAddrsToReserves) EpochState ShelleyEra es