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.Mempool (tests)
import qualified Test.Consensus.Mempool.Fairness (tests)
import qualified Test.Consensus.MiniProtocol.BlockFetch.Client (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.Client.tests
  , TestTree
Test.Consensus.MiniProtocol.LocalStateQuery.Server.tests
  , TestTree
Test.Consensus.Mempool.tests
  , TestTree
Test.Consensus.Mempool.Fairness.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
          ]
      ]
  ]