b810ac9d1e42268211c70bdf276614b77febb5ec — Johan Johansson 2 years ago 4ecc43e
Fix tests
1 files changed, 7 insertions(+), 7 deletions(-)

M test/ParseSpec.hs
M test/ParseSpec.hs => test/ParseSpec.hs +7 -7
@@ 6,15 6,15 @@ import Text.Parsec hiding (parse)
import Test.Hspec
import Test.QuickCheck

import Misc
import Ast
import Pretty
import Parse

spec :: Spec
spec = do
  describe "parse, few" $
    it "parses a program to an AST, and is the inverse of pretty. Runs a few times." $
    withMaxSuccess 1e3 (\progAst -> parse "spec" (pretty progAst) == Right progAst)
  describe "parse, many" $
    it ": Same as above, but many times." $
    withMaxSuccess 6e4 (\progAst -> parse "spec" (pretty progAst) == Right progAst)
    describe "parse inverse of pretty"
        $ it
              "Parsing a pretty printed program should return the original program"
        $ withMaxSuccess
              (\progAst -> parse "spec" (pretty progAst) == Right progAst)