freec-unit-tests

Safe HaskellNone
LanguageHaskell2010

FreeC.Frontend.IR.ParserTests

Description

This module contains tests for FreeC.Frontend.IR.Parser.

Synopsis

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 #

Test group for Parseable instance of Name.

testQNameParser :: Spec Source #

Test group for Parseable instance of QName.

testTypeParser :: Spec Source #

Test group for Parseable instance of Type.

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 #

Test group for Parseable instance of TypeSig.

testExprParser :: Spec Source #

Test group for Parseable instance of Expr.

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 #

Test group for Parseable instance of Module.