{-# LANGUAGE TypeApplications #-}

module Main where

import Cardano.Ledger.Mary (MaryEra)
import Test.Cardano.Ledger.Common
import Test.Cardano.Ledger.Core.JSON (roundTripJsonEraSpec)
import qualified Test.Cardano.Ledger.Mary.Binary.CddlSpec as CddlSpec
import qualified Test.Cardano.Ledger.Mary.BinarySpec as BinarySpec
import qualified Test.Cardano.Ledger.Mary.Imp as Imp
import Test.Cardano.Ledger.Mary.ImpTest ()
import qualified Test.Cardano.Ledger.Mary.ValueSpec as ValueSpec
import Test.Cardano.Ledger.Shelley.JSON (roundTripJsonShelleyEraSpec)

main :: IO ()
IO ()
main =
  Spec -> IO ()
ledgerTestMain (Spec -> IO ()) -> Spec -> IO ()
forall a b. (a -> b) -> a -> b
$
    String -> Spec -> Spec
forall a. HasCallStack => String -> SpecWith a -> SpecWith a
describe String
"Mary" (Spec -> Spec) -> Spec -> Spec
forall a b. (a -> b) -> a -> b
$ do
      Spec
ValueSpec.spec
      Spec
BinarySpec.spec
      Spec
CddlSpec.spec
      String -> Spec -> Spec
forall a. HasCallStack => String -> SpecWith a -> SpecWith a
describe String
"Imp" (Spec -> Spec) -> Spec -> Spec
forall a b. (a -> b) -> a -> b
$ do
        forall era.
(MaryEraImp era,
 InjectRuleFailure "LEDGER" ShelleyUtxoPredFailure era,
 InjectRuleFailure "LEDGER" ShelleyUtxowPredFailure era) =>
Spec
Imp.spec @MaryEra
      forall era. (HasCallStack, EraTest era) => Spec
roundTripJsonEraSpec @MaryEra
      forall era. ShelleyEraTest era => Spec
roundTripJsonShelleyEraSpec @MaryEra