Fail if parsing fails in type checker tests.

This commit is contained in:
chriseth 2016-11-09 10:48:45 +01:00
parent 88547a1c66
commit 63bde109a1

View File

@ -57,7 +57,7 @@ parseAnalyseAndReturnError(string const& _source, bool _reportWarnings = false,
{ {
sourceUnit = parser.parse(std::make_shared<Scanner>(CharStream(source))); sourceUnit = parser.parse(std::make_shared<Scanner>(CharStream(source)));
if(!sourceUnit) if(!sourceUnit)
return make_pair(sourceUnit, nullptr); BOOST_FAIL("Parsing failed in type checker test.");
SyntaxChecker syntaxChecker(errors); SyntaxChecker syntaxChecker(errors);
if (!syntaxChecker.checkSyntax(*sourceUnit)) if (!syntaxChecker.checkSyntax(*sourceUnit))