{-# LANGUAGE ImportQualifiedPost #-} module Main where import System.IO ( BufferMode (LineBuffering), hSetBuffering, hSetEncoding, stdout, utf8, ) import Test.Cardano.Data.MapExtrasSpec (mapExtrasSpec) import Test.Cardano.Data.OMap.StrictSpec qualified as OMap import Test.Cardano.Data.OSet.StrictSpec qualified as OSet import Test.Hspec import Test.Hspec.Runner conf :: Config conf :: Config conf = Config defaultConfig { configTimes :: Bool configTimes = Bool True , configColorMode :: ColorMode configColorMode = ColorMode ColorAlways } spec :: Spec spec :: Spec spec = forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "cardano-data" forall a b. (a -> b) -> a -> b $ do forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "MapExtras" Spec mapExtrasSpec forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "OSet.Strict" Spec OSet.spec forall a. HasCallStack => String -> SpecWith a -> SpecWith a describe String "OMap.Strict" Spec OMap.spec main :: IO () IO () main = do Handle -> BufferMode -> IO () hSetBuffering Handle stdout BufferMode LineBuffering Handle -> TextEncoding -> IO () hSetEncoding Handle stdout TextEncoding utf8 Config -> Spec -> IO () hspecWith Config conf Spec spec