Commit 8540effe authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Unit test and handle note-lines in gcc output.

parent 9e1125d4
...@@ -42,7 +42,7 @@ namespace { ...@@ -42,7 +42,7 @@ namespace {
GccParser::GccParser() GccParser::GccParser()
{ {
m_regExp.setPattern(QString::fromLatin1(FILE_PATTERN) + QLatin1String("(\\d+):(\\d+:)?\\s(#?(warning|error):?\\s)(.+)$")); m_regExp.setPattern(QString::fromLatin1(FILE_PATTERN) + QLatin1String("(\\d+):(\\d+:)?\\s(#?(warning|error|note):?\\s)(.+)$"));
m_regExp.setMinimal(true); m_regExp.setMinimal(true);
m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$"); m_regExpIncluded.setPattern("^.*from\\s([^:]+):(\\d+)(,|:)$");
...@@ -375,7 +375,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data() ...@@ -375,7 +375,16 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
<< QString() << QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...") << QString() << QString::fromLatin1("TeamBuilder Client:: error: could not find Scheduler, running Job locally...")
<< QList<ProjectExplorer::Task>() << QList<ProjectExplorer::Task>()
<< QString(); << QString();
QTest::newRow("note")
<< QString::fromLatin1("/home/dev/creator/share/qtcreator/gdbmacros/gdbmacros.cpp:1079: note: initialized from here")
<< OutputParserTester::STDERR
<< QString() << QString()
<< ( QList<ProjectExplorer::Task>()
<< Task(Task::Unknown,
QLatin1String("initialized from here"),
QString::fromLatin1("/home/dev/creator/share/qtcreator/gdbmacros/gdbmacros.cpp"), 1079,
Constants::TASK_CATEGORY_COMPILE))
<< QString();
} }
void ProjectExplorerPlugin::testGccOutputParsers() void ProjectExplorerPlugin::testGccOutputParsers()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment