Added error codes to SyntaxTest expectations (changed code)

This commit is contained in:
a3d4
2020-06-22 16:53:03 +02:00
parent e04cedafc5
commit 1d2ae7d82a
6 changed files with 23 additions and 6 deletions
+1
View File
@@ -127,6 +127,7 @@ TestCase::TestResult SMTCheckerJSONTest::run(ostream& _stream, string const& _li
end -= preamble.size();
m_errorList.emplace_back(SyntaxTestError{
error["type"].asString(),
error["errorId"].isNull() ? nullopt : optional<langutil::ErrorId>(langutil::ErrorId{error["errorId"].asUInt()}),
error["message"].asString(),
sourceName,
static_cast<int>(start),
+2
View File
@@ -79,6 +79,7 @@ void SyntaxTest::parseAndAnalyze()
{
m_errorList.emplace_back(SyntaxTestError{
"UnimplementedFeatureError",
nullopt,
errorMessage(_e),
"",
-1,
@@ -106,6 +107,7 @@ void SyntaxTest::filterObtainedErrors()
}
m_errorList.emplace_back(SyntaxTestError{
currentError->typeName(),
currentError->errorId(),
errorMessage(*currentError),
sourceName,
locationStart,