From 12c7c72e83f60f1b7b9faa7f94e260f2514f4923 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Tue, 15 Mar 2011 15:46:37 +0100
Subject: [PATCH] Gccparser: Add unit test

---
 src/plugins/projectexplorer/gccparser.cpp | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index 9e91c7c1534..64a5c094cfd 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -623,6 +623,21 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
                         Constants::TASK_CATEGORY_COMPILE))
             << QString();
 
+    QTest::newRow("enumeration warning")
+            << QString::fromLatin1("../../../src/shared/proparser/profileevaluator.cpp: In member function ‘ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)’:\n"
+                                   "../../../src/shared/proparser/profileevaluator.cpp:2817:9: warning: case value ‘0’ not in enumerated type ‘ProFileEvaluator::Private::TestFunc’")
+            << OutputParserTester::STDERR
+            << QString() << QString()
+            << ( QList<ProjectExplorer::Task>()
+                << Task(Task::Unknown,
+                        QLatin1String("In member function ‘ProFileEvaluator::Private::VisitReturn ProFileEvaluator::Private::evaluateConditionalFunction(const ProString&, const ProStringList&)’:"),
+                        QLatin1String("../../../src/shared/proparser/profileevaluator.cpp"), -1,
+                        Constants::TASK_CATEGORY_COMPILE)
+                << Task(Task::Warning,
+                        QLatin1String("case value ‘0’ not in enumerated type ‘ProFileEvaluator::Private::TestFunc’"),
+                        QLatin1String("../../../src/shared/proparser/profileevaluator.cpp"), 2817,
+                        Constants::TASK_CATEGORY_COMPILE))
+            << QString();
 }
 
 void ProjectExplorerPlugin::testGccOutputParsers()
-- 
GitLab