~jojo/Carth

ref: 65fedc5ad30893bac36f128dac201ff7081f8e1b Carth/test/ParseSpec.hs -rw-r--r-- 325 bytes
65fedc5aJoJo Allow Box in pattern to dereference 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)