forked from qt-creator/qt-creator
PE: Fix expectations of LinkSpecs test on Windows
The output parser detects Windows paths on Unix differently which
makes the format differ from the one that is generated on a
Windows host.
Beside this remove BOM from msvcparser again and do not perform
the format check if there is no expected format specified.
Amends 9e4e9924ad
.
Change-Id: Icb0d292a8908cdd2f86b13fde6d2d287f3a96dd6
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -389,6 +389,14 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
8))
|
8))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
|
QVector<QTextLayout::FormatRange> formatRanges;
|
||||||
|
if (HostOsInfo::isWindowsHost()) {
|
||||||
|
formatRanges << formatRange(51, 28)
|
||||||
|
<< formatRange(79, 31, "olpfile://C:/temp/test/untitled8/main.cpp::8::-1")
|
||||||
|
<< formatRange(110, 54);
|
||||||
|
} else {
|
||||||
|
formatRanges << formatRange(51, 113);
|
||||||
|
}
|
||||||
QTest::newRow("Undefined reference (debug)")
|
QTest::newRow("Undefined reference (debug)")
|
||||||
<< QString::fromLatin1("main.o: In function `main':\n"
|
<< QString::fromLatin1("main.o: In function `main':\n"
|
||||||
"C:\\temp\\test\\untitled8/main.cpp:8: undefined reference to `MainWindow::doSomething()'\n"
|
"C:\\temp\\test\\untitled8/main.cpp:8: undefined reference to `MainWindow::doSomething()'\n"
|
||||||
@@ -402,12 +410,19 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
"C:\\temp\\test\\untitled8/main.cpp:8: undefined reference to `MainWindow::doSomething()'",
|
"C:\\temp\\test\\untitled8/main.cpp:8: undefined reference to `MainWindow::doSomething()'",
|
||||||
FilePath::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"),
|
FilePath::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"),
|
||||||
8,
|
8,
|
||||||
QVector<QTextLayout::FormatRange>()
|
formatRanges)
|
||||||
<< formatRange(51, 113))
|
|
||||||
<< CompileTask(Task::Error,
|
<< CompileTask(Task::Error,
|
||||||
"collect2: ld returned 1 exit status"))
|
"collect2: ld returned 1 exit status"))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
|
formatRanges.clear();
|
||||||
|
if (HostOsInfo::isWindowsHost()) {
|
||||||
|
formatRanges << formatRange(51, 28)
|
||||||
|
<< formatRange(79, 31, "olpfile://C:/temp/test/untitled8/main.cpp::0::-1")
|
||||||
|
<< formatRange(110, 65);
|
||||||
|
} else {
|
||||||
|
formatRanges << formatRange(51, 124);
|
||||||
|
}
|
||||||
QTest::newRow("Undefined reference (release)")
|
QTest::newRow("Undefined reference (release)")
|
||||||
<< QString::fromLatin1("main.o: In function `main':\n"
|
<< QString::fromLatin1("main.o: In function `main':\n"
|
||||||
"C:\\temp\\test\\untitled8/main.cpp:(.text+0x40): undefined reference to `MainWindow::doSomething()'\n"
|
"C:\\temp\\test\\untitled8/main.cpp:(.text+0x40): undefined reference to `MainWindow::doSomething()'\n"
|
||||||
@@ -421,8 +436,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
"C:\\temp\\test\\untitled8/main.cpp:(.text+0x40): undefined reference to `MainWindow::doSomething()'",
|
"C:\\temp\\test\\untitled8/main.cpp:(.text+0x40): undefined reference to `MainWindow::doSomething()'",
|
||||||
FilePath::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"),
|
FilePath::fromUserInput("C:\\temp\\test\\untitled8/main.cpp"),
|
||||||
-1,
|
-1,
|
||||||
QVector<QTextLayout::FormatRange>()
|
formatRanges)
|
||||||
<< formatRange(51, 124))
|
|
||||||
<< CompileTask(Task::Error,
|
<< CompileTask(Task::Error,
|
||||||
"collect2: ld returned 1 exit status"))
|
"collect2: ld returned 1 exit status"))
|
||||||
<< QString();
|
<< QString();
|
||||||
@@ -654,6 +668,14 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
54))
|
54))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
|
formatRanges.clear();
|
||||||
|
if (HostOsInfo::isWindowsHost()) {
|
||||||
|
formatRanges << formatRange(46, 44)
|
||||||
|
<< formatRange(90, 39, "olpfile://M:/Development/x64/QtPlot/qplotaxis.cpp::26::-1")
|
||||||
|
<< formatRange(129, 50);
|
||||||
|
} else {
|
||||||
|
formatRanges << formatRange(46, 133);
|
||||||
|
}
|
||||||
QTest::newRow("QTCREATORBUG-597")
|
QTest::newRow("QTCREATORBUG-597")
|
||||||
<< QString::fromLatin1("debug/qplotaxis.o: In function `QPlotAxis':\n"
|
<< 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"
|
||||||
@@ -668,8 +690,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
"M:\\Development\\x64\\QtPlot/qplotaxis.cpp:26: undefined reference to `vtable for QPlotAxis'",
|
"M:\\Development\\x64\\QtPlot/qplotaxis.cpp:26: undefined reference to `vtable for QPlotAxis'",
|
||||||
FilePath::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"),
|
FilePath::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"),
|
||||||
26,
|
26,
|
||||||
QVector<QTextLayout::FormatRange>()
|
formatRanges)
|
||||||
<< formatRange(46, 133))
|
|
||||||
<< CompileTask(Task::Error,
|
<< CompileTask(Task::Error,
|
||||||
"undefined reference to `vtable for QPlotAxis'",
|
"undefined reference to `vtable for QPlotAxis'",
|
||||||
FilePath::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"),
|
FilePath::fromUserInput("M:\\Development\\x64\\QtPlot/qplotaxis.cpp"),
|
||||||
@@ -708,6 +729,20 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
<< formatRange(23, 85)))
|
<< formatRange(23, 85)))
|
||||||
<< QString();
|
<< QString();
|
||||||
|
|
||||||
|
formatRanges.clear();
|
||||||
|
if (HostOsInfo::isWindowsHost()) {
|
||||||
|
formatRanges << formatRange(33, 22)
|
||||||
|
<< formatRange(55, 38, "olpfile://C:/Symbian_SDK/epoc32/include/e32cmn.h::6792::-1")
|
||||||
|
<< formatRange(93, 29)
|
||||||
|
<< formatRange(122, 38, "olpfile://C:/Symbian_SDK/epoc32/include/e32std.h::25::-1")
|
||||||
|
<< formatRange(160, 5)
|
||||||
|
<< formatRange(165, 40, "olpfile://C:/Symbian_SDK/epoc32/include/e32cmn.inl::0::-1")
|
||||||
|
<< formatRange(205, 69)
|
||||||
|
<< formatRange(274, 40, "olpfile://C:/Symbian_SDK/epoc32/include/e32cmn.inl::7094::-1")
|
||||||
|
<< formatRange(314, 48);
|
||||||
|
} else {
|
||||||
|
formatRanges << formatRange(33, 329);
|
||||||
|
}
|
||||||
QTest::newRow("GCCE from lines")
|
QTest::newRow("GCCE from lines")
|
||||||
<< QString::fromLatin1("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,\n"
|
<< QString::fromLatin1("In file included from C:/Symbian_SDK/epoc32/include/e32cmn.h:6792,\n"
|
||||||
" from C:/Symbian_SDK/epoc32/include/e32std.h:25,\n"
|
" from C:/Symbian_SDK/epoc32/include/e32std.h:25,\n"
|
||||||
@@ -723,8 +758,7 @@ void ProjectExplorerPlugin::testGccOutputParsers_data()
|
|||||||
"C:/Symbian_SDK/epoc32/include/e32cmn.inl:7094: warning: returning reference to temporary",
|
"C:/Symbian_SDK/epoc32/include/e32cmn.inl:7094: warning: returning reference to temporary",
|
||||||
FilePath::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"),
|
FilePath::fromUserInput("C:/Symbian_SDK/epoc32/include/e32cmn.inl"),
|
||||||
7094,
|
7094,
|
||||||
QVector<QTextLayout::FormatRange>()
|
formatRanges)}
|
||||||
<< formatRange(33, 329))}
|
|
||||||
<< QString();
|
<< QString();
|
||||||
QTest::newRow("In constructor 2")
|
QTest::newRow("In constructor 2")
|
||||||
<< QString::fromUtf8("perfattributes.cpp: In constructor ‘PerfEventAttributes::PerfEventAttributes()’:\n"
|
<< QString::fromUtf8("perfattributes.cpp: In constructor ‘PerfEventAttributes::PerfEventAttributes()’:\n"
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
**
|
**
|
||||||
** Copyright (C) 2016 The Qt Company Ltd.
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
** Contact: https://www.qt.io/licensing/
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
@@ -92,6 +92,9 @@ void OutputParserTester::testParsing(const QString &lines,
|
|||||||
msgFileComparisonFail(m_receivedTasks.at(i).file, tasks.at(i).file));
|
msgFileComparisonFail(m_receivedTasks.at(i).file, tasks.at(i).file));
|
||||||
QCOMPARE(m_receivedTasks.at(i).line, tasks.at(i).line);
|
QCOMPARE(m_receivedTasks.at(i).line, tasks.at(i).line);
|
||||||
QCOMPARE(static_cast<int>(m_receivedTasks.at(i).type), static_cast<int>(tasks.at(i).type));
|
QCOMPARE(static_cast<int>(m_receivedTasks.at(i).type), static_cast<int>(tasks.at(i).type));
|
||||||
|
// Skip formats check if we haven't specified expected
|
||||||
|
if (tasks.at(i).formats.size() == 0)
|
||||||
|
continue;
|
||||||
QCOMPARE(m_receivedTasks.at(i).formats.size(), tasks.at(i).formats.size());
|
QCOMPARE(m_receivedTasks.at(i).formats.size(), tasks.at(i).formats.size());
|
||||||
for (int j = 0; j < tasks.at(i).formats.size(); ++j) {
|
for (int j = 0; j < tasks.at(i).formats.size(); ++j) {
|
||||||
QCOMPARE(m_receivedTasks.at(i).formats.at(j).start, tasks.at(i).formats.at(j).start);
|
QCOMPARE(m_receivedTasks.at(i).formats.at(j).start, tasks.at(i).formats.at(j).start);
|
||||||
|
Reference in New Issue
Block a user