{-# OPTIONS_GHC -Wno-unused-imports #-}

module Main (main) where

import qualified Test.Consensus.BlockchainTime.Simple (tests)
import qualified Test.Consensus.HardFork.Forecast (tests)
import qualified Test.Consensus.HardFork.History (tests)
import qualified Test.Consensus.HardFork.Summary (tests)
import qualified Test.Consensus.HeaderValidation (tests)
import qualified Test.Consensus.Ledger.Tables.Diff (tests)
import qualified Test.Consensus.Ledger.Tables.DiffSeq (tests)
import qualified Test.Consensus.Mempool (tests)
import qualified Test.Consensus.Mempool.Fairness (tests)
import qualified Test.Consensus.Mempool.StateMachine (tests)
import qualified Test.Consensus.MiniProtocol.BlockFetch.Client (tests)
import qualified Test.Consensus.MiniProtocol.ChainSync.CSJ (tests)
import qualified Test.Consensus.MiniProtocol.ChainSync.Client (tests)
import qualified Test.Consensus.MiniProtocol.LocalStateQuery.Server (tests)
import qualified Test.Consensus.Util.MonadSTM.NormalForm (tests)
import qualified Test.Consensus.Util.Versioned (tests)
import Test.Tasty
import Test.Util.TestEnv
  ( defaultMainWithTestEnv
  , defaultTestEnvConfig
  )

main :: IO ()
IO ()
main = TestEnvConfig -> TestTree -> IO ()
defaultMainWithTestEnv TestEnvConfig
defaultTestEnvConfig TestTree
tests

tests :: TestTree
tests :: TestTree
tests =
  TestName -> [TestTree] -> TestTree
testGroup
    TestName
"ouroboros-consensus"
    [ TestTree
Test.Consensus.BlockchainTime.Simple.tests
    , TestTree
Test.Consensus.HeaderValidation.tests
    , TestTree
Test.Consensus.MiniProtocol.BlockFetch.Client.tests
    , TestTree
Test.Consensus.MiniProtocol.ChainSync.CSJ.tests
    , TestTree
Test.Consensus.MiniProtocol.ChainSync.Client.tests
    , TestTree
Test.Consensus.MiniProtocol.LocalStateQuery.Server.tests
    , TestName -> [TestTree] -> TestTree
testGroup
        TestName
"Mempool"
        [ TestTree
Test.Consensus.Mempool.tests
        , TestTree
Test.Consensus.Mempool.Fairness.tests
        , TestTree
Test.Consensus.Mempool.StateMachine.tests
        ]
    , TestTree
Test.Consensus.Util.MonadSTM.NormalForm.tests
    , TestTree
Test.Consensus.Util.Versioned.tests
    , TestName -> [TestTree] -> TestTree
testGroup
        TestName
"HardFork"
        [ TestName -> [TestTree] -> TestTree
testGroup
            TestName
"History"
            [ TestTree
Test.Consensus.HardFork.Summary.tests
            , TestTree
Test.Consensus.HardFork.History.tests
            ]
        , TestName -> [TestTree] -> TestTree
testGroup
            TestName
"Combinator"
            [ TestTree
Test.Consensus.HardFork.Forecast.tests
            ]
        ]
    , TestTree
Test.Consensus.Ledger.Tables.Diff.tests
    , TestTree
Test.Consensus.Ledger.Tables.DiffSeq.tests
    ]