Safe Haskell | None |
---|---|
Language | Haskell2010 |
FreeC.Frontend.IR.ParserTests
Description
This module contains tests for FreeC.Frontend.IR.Parser.
Synopsis
- shouldParse :: (Eq a, Parseable a, Show a) => String -> a -> Expectation
- shouldParseModule :: [String] -> Module -> Expectation
- shouldBeParseError :: (Parseable a, Show a) => Reporter a -> Expectation
- testIRParser :: Spec
- testNameParser :: Spec
- testQNameParser :: Spec
- testTypeParser :: Spec
- testTypeSchemeParser :: Spec
- testSynTypeDeclParser :: Spec
- testDataDeclParser :: Spec
- testTypeSigParser :: Spec
- testExprParser :: Spec
- testExprTypeParser :: Spec
- testConExprParser :: Spec
- testVarExprParser :: Spec
- testAppExprParser :: Spec
- testLambdaExprParser :: Spec
- testIfExprParser :: Spec
- testCaseExprParser :: Spec
- testEffectParser :: Spec
- testTypeAppExprParser :: Spec
- testIntLiteralParser :: Spec
- testFuncDeclParser :: Spec
- testImportDeclParser :: Spec
- testModuleParser :: Spec
Documentation
shouldParse :: (Eq a, Parseable a, Show a) => String -> a -> Expectation Source #
Sets the expectation that the Parseable
instance accepts the given
input and produces the given output.
shouldParseModule :: [String] -> Module -> Expectation Source #
Like shouldParse
for modules.
Automatically concatenates the lines of the input module.
shouldBeParseError :: (Parseable a, Show a) => Reporter a -> Expectation Source #
Sets the expectation that the given parser reports a fatal message.
testIRParser :: Spec Source #
Test group for FreeC.Frontend.IR.Parser tests.
testNameParser :: Spec Source #
testQNameParser :: Spec Source #
testTypeParser :: Spec Source #
testTypeSchemeParser :: Spec Source #
Test group for Parseable
instance of TypeScheme
.
testSynTypeDeclParser :: Spec Source #
Test group for Parseable
instance of type synonym declarations.
testDataDeclParser :: Spec Source #
Test group for Parseable
instance of data type declarations.
testTypeSigParser :: Spec Source #
testExprParser :: Spec Source #
testExprTypeParser :: Spec Source #
Test group for Parseable
instance of expressions with type annotations.
testConExprParser :: Spec Source #
Test group for Parseable
instance of constructor expressions.
testVarExprParser :: Spec Source #
Test group for Parseable
instance of variable expressions.
testAppExprParser :: Spec Source #
Test group for Parseable
instance of function application expressions.
testLambdaExprParser :: Spec Source #
Test group for Parseable
instance of lambda abstractions.
testIfExprParser :: Spec Source #
Test group for Parseable
instance of if
expressions.
testCaseExprParser :: Spec Source #
Test group for Parseable
instance of case
expressions.
testEffectParser :: Spec Source #
Test group for Parseable
instance of effects.
testTypeAppExprParser :: Spec Source #
Test group for Parseable
instance of visible type applications.
testIntLiteralParser :: Spec Source #
Test group for Parseable
instance of integer literal expressions.
testFuncDeclParser :: Spec Source #
Test group for Parseable
instance of function declarations.
testImportDeclParser :: Spec Source #
Test group for Parseable
instance of ImportDecl
.
testModuleParser :: Spec Source #