~jojo/Carth

ref: db87ea9bdce9470b546bb3098f5d79a9b1023af1 Carth/test/ParseSpec.hs -rw-r--r-- 325 bytes
db87ea9bJoJo Disclaim WIP status in readme 1 year, 10 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE NumDecimals #-}

module ParseSpec where

import Test.Hspec
import Test.QuickCheck

import Misc
import Ast
import Parse
import Arbitrary


spec :: Spec
spec = do
    describe "parse" $ it "is the inverse of pretty" $ withMaxSuccess
        1e4
        (\progAst -> parse "spec" (pretty progAst) == Right progAst)