Fix bench

This commit is contained in:
Avi Dessauer 2020-05-09 01:48:25 -04:00
parent 9a7711125d
commit 981a404792
2 changed files with 5 additions and 11 deletions

View File

@ -56,6 +56,7 @@ parseComponent :: Indent -> Parser Component
parseComponent i =
parseExe i
<|> parseLib i
<|> parseBench i
<|> parseTestSuite i
parseLib :: Indent -> Parser Component

View File

@ -28,8 +28,10 @@ spec = do
`shouldParse` Comp Lib "" "src"
describe "Should Succeed"
$ it "successfully parses bench section"
$ benchSection ~> parseBench 0
`shouldParse` Comp Bench "folds" "benchmarks/folds.hs"
$ do
bs <- T.readFile "test/benchSection"
bs ~> parseBench 0
`shouldParse` Comp Bench "folds" "benchmarks/folds.hs"
describe "Should Succeed"
$ it "successfully parses package"
$ fullFile ~> parsePackage
@ -106,15 +108,6 @@ libSection =
\ default-language: Haskell2010\n\
\"
benchSection :: Text
benchSection =
"benchmark folds\n\
\ default-language: Haskell2010\n\
\ hs-source-dirs: benchmarks\n\
\ ghc-options: -Wall -threaded\n\
\ type: exitcode-stdio-1.0\n\
\ main-is: folds.hs\n"
stackHie :: String
stackHie =
"cradle:\n\