Format
This commit is contained in:
parent
60acecb993
commit
40f7a8ee9a
10
app/Main.hs
10
app/Main.hs
@ -32,11 +32,11 @@ main =
|
||||
|
||||
puzzleTest :: FilePath -> Puzzle -> TestTree
|
||||
puzzleTest t Puzzle{number, parser, parts} =
|
||||
withResource (parseFile $ "inputs/" <> t <> "/" <> pt) mempty \input ->
|
||||
testGroup pt $
|
||||
zip (map show [1 :: Int ..]) parts <&> \(n, pp) ->
|
||||
goldenVsString n ("outputs/" <> t <> "/" <> pt <> "/" <> n) $
|
||||
BL.fromStrict . encodeUtf8 . pp <$> input
|
||||
withResource (parseFile $ "inputs/" <> t <> "/" <> pt) mempty \input ->
|
||||
testGroup pt $
|
||||
zip (map show [1 :: Int ..]) parts <&> \(n, pp) ->
|
||||
goldenVsString n ("outputs/" <> t <> "/" <> pt <> "/" <> n) $
|
||||
BL.fromStrict . encodeUtf8 . pp <$> input
|
||||
where
|
||||
pt = show number
|
||||
parseFile fp =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user