Tidy up main

This commit is contained in:
George Thomas 2026-01-06 18:48:37 +00:00
parent db41a65453
commit ecb7391468

View File

@ -18,10 +18,15 @@ import Puzzles.Day9 qualified as Day9
import Text.Pretty.Simple (pPrintForceColor) import Text.Pretty.Simple (pPrintForceColor)
main :: IO () main :: IO ()
main = main = do
(pPrintForceColor =<<) $ runTests () $ test "tests" pure $ flip map enumerate \isRealData@(bool "examples" "real" -> t) -> pPrintForceColor $ getTestTree tests
test (mkTestName t) pure $ flip pPrintForceColor =<< runTests () tests
map
tests :: TestTree IO ()
tests =
test "tests" pure $
enumerate <&> \isRealData@(bool "examples" "real" -> t) ->
test (mkTestName t) pure $
[ Day1.puzzle [ Day1.puzzle
, Day2.puzzle , Day2.puzzle
, Day3.puzzle , Day3.puzzle
@ -32,9 +37,7 @@ main =
, Day8.puzzle , Day8.puzzle
, Day9.puzzle , Day9.puzzle
, Day10.puzzle , Day10.puzzle
] ] <&> \Puzzle{number = show -> pt, parser, parts, extraTests} -> testLazy
\Puzzle{number = show -> pt, parser, parts, extraTests} ->
testLazy
(mkTestName pt) (mkTestName pt)
( \() -> do ( \() -> do
let fp = "../inputs/" <> t <> "/" <> pt let fp = "../inputs/" <> t <> "/" <> pt