module Main (main) where

import System.IO (BufferMode (LineBuffering), hSetBuffering, stdout)
import qualified Test.Consensus.Cardano.Capacity (tests)
import qualified Test.Consensus.Cardano.DiffusionPipelining
import Test.Consensus.Cardano.GenCDDLs
import qualified Test.Consensus.Cardano.Golden
import qualified Test.Consensus.Cardano.LeiosFetch
import qualified Test.Consensus.Cardano.LeiosNotify
import qualified Test.Consensus.Cardano.MiniProtocol.LocalTxSubmission.Server
import qualified Test.Consensus.Cardano.Serialisation (tests)
import qualified Test.Consensus.Cardano.Show ()
import qualified Test.Consensus.Cardano.SupportedNetworkProtocolVersion
import qualified Test.Consensus.Cardano.SupportsSanityCheck
import qualified Test.Consensus.Cardano.Translation (forecastTests, tests)
import qualified Test.Consensus.Cardano.TxId (tests)
import Test.Tasty
import qualified Test.ThreadNet.AllegraMary
import qualified Test.ThreadNet.Cardano
import qualified Test.ThreadNet.MaryAlonzo
import qualified Test.ThreadNet.ShelleyAllegra
import Test.Util.TestEnv
  ( defaultMainWithTestEnv
  , defaultTestEnvConfig
  )

main :: IO ()
IO ()
main = do
  Handle -> BufferMode -> IO ()
hSetBuffering Handle
stdout BufferMode
LineBuffering
  TestEnvConfig -> TestTree -> IO ()
defaultMainWithTestEnv TestEnvConfig
defaultTestEnvConfig TestTree
tests

tests :: TestTree
tests :: TestTree
tests =
  TestName -> [TestTree] -> TestTree
testGroup
    TestName
"cardano"
    [ TestTree
Test.Consensus.Cardano.Capacity.tests
    , TestTree
Test.Consensus.Cardano.DiffusionPipelining.tests
    , TestTree -> TestTree
withCDDLs (TestTree -> TestTree) -> TestTree -> TestTree
forall a b. (a -> b) -> a -> b
$
        TestName -> [TestTree] -> TestTree
testGroup
          TestName
"Serialisation"
          [ TestTree
Test.Consensus.Cardano.Golden.tests
          , TestTree
Test.Consensus.Cardano.LeiosFetch.tests
          , TestTree
Test.Consensus.Cardano.LeiosNotify.tests
          , TestTree
Test.Consensus.Cardano.Serialisation.tests
          ]
    , TestTree
Test.Consensus.Cardano.SupportedNetworkProtocolVersion.tests
    , TestTree
Test.Consensus.Cardano.SupportsSanityCheck.tests
    , TestTree
Test.ThreadNet.AllegraMary.tests
    , TestTree
Test.ThreadNet.Cardano.tests
    , TestTree
Test.ThreadNet.MaryAlonzo.tests
    , TestTree
Test.ThreadNet.ShelleyAllegra.tests
    , TestTree
Test.Consensus.Cardano.MiniProtocol.LocalTxSubmission.Server.tests
    , TestTree
Test.Consensus.Cardano.Translation.tests
    , TestTree
Test.Consensus.Cardano.Translation.forecastTests
    , TestTree
Test.Consensus.Cardano.TxId.tests
    ]