From 61e6873a537dcb928dda0918f94f837d7c4fdb68 Mon Sep 17 00:00:00 2001
From: Tobias Hunger <tobias.hunger@nokia.com>
Date: Wed, 7 Jul 2010 10:23:24 +0200
Subject: [PATCH] Add unit test for QTCREATORBUG-597

 * This is already implicitly tested, but since the reporter
   claims that there was a regression I explicitly added this test.
 * No change needed to make the unit test pass.
---
 src/plugins/projectexplorer/gccparser.cpp | 26 +++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/plugins/projectexplorer/gccparser.cpp b/src/plugins/projectexplorer/gccparser.cpp
index 5f7685c7cd3..125109caa3d 100644
--- a/src/plugins/projectexplorer/gccparser.cpp
+++ b/src/plugins/projectexplorer/gccparser.cpp
@@ -489,6 +489,32 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
                          QLatin1String("/home/code/test.cpp"), 54,
                          Constants::TASK_CATEGORY_COMPILE))
             << QString();
+
+    QTest::newRow("QTCREATORBUG-597")
+            << QString::fromLatin1("debug/qplotaxis.o: In function `QPlotAxis':\n"
+                                   "M:\\Development\\x64\\QtPlot/qplotaxis.cpp:26: undefined reference to `vtable for QPlotAxis'\n"
+                                   "M:\\Development\\x64\\QtPlot/qplotaxis.cpp:26: undefined reference to `vtable for QPlotAxis'\n"
+                                   "collect2: ld returned 1 exit status")
+            << OutputParserTester::STDERR
+            << QString() << QString()
+            << ( QList<ProjectExplorer::Task>()
+                << Task(Task::Unknown,
+                        QLatin1String("In function `QPlotAxis':"),
+                        QLatin1String("debug/qplotaxis.o"), -1,
+                        Constants::TASK_CATEGORY_COMPILE)
+                << Task(Task::Error,
+                        QLatin1String("undefined reference to `vtable for QPlotAxis'"),
+                        QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
+                        Constants::TASK_CATEGORY_COMPILE)
+                << Task(Task::Error,
+                        QLatin1String("undefined reference to `vtable for QPlotAxis'"),
+                        QLatin1String("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"), 26,
+                        Constants::TASK_CATEGORY_COMPILE)
+                << Task(Task::Error,
+                        QLatin1String("collect2: ld returned 1 exit status"),
+                        QString(), -1,
+                        Constants::TASK_CATEGORY_COMPILE))
+            << QString();
 }
 
 void ProjectExplorerPlugin::testGccOutputParsers()
-- 
GitLab