aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/nim
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2024-11-20 17:27:26 +0100
committerChristian Kandeler <[email protected]>2024-11-25 12:26:56 +0000
commitb8ce8c146eb594cca917344bdc93eca6ab53c543 (patch)
tree267bb9b5f4be0ea650af30257a481676cdb13ed2 /src/plugins/nim
parentd7bc681ed9a90d1e58c5bfa8cb6948d74d1f97d2 (diff)
ProjectExplorer: Use string lists to represent lines
... in the OutputParserTest. All those trailing newlines in particular were enormously confusing. Change-Id: I8b661402f4ae8c648c7d0ec662649e11da977616 Reviewed-by: Christian Stenger <[email protected]>
Diffstat (limited to 'src/plugins/nim')
-rw-r--r--src/plugins/nim/project/nimoutputtaskparser.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/plugins/nim/project/nimoutputtaskparser.cpp b/src/plugins/nim/project/nimoutputtaskparser.cpp
index 90fb0009752..303a17978ba 100644
--- a/src/plugins/nim/project/nimoutputtaskparser.cpp
+++ b/src/plugins/nim/project/nimoutputtaskparser.cpp
@@ -58,25 +58,25 @@ void NimParserTest::testNimParser_data()
{
QTest::addColumn<QString>("input");
QTest::addColumn<OutputParserTester::Channel>("inputChannel");
- QTest::addColumn<QString>("childStdOutLines");
- QTest::addColumn<QString>("childStdErrLines");
+ QTest::addColumn<QStringList>("childStdOutLines");
+ QTest::addColumn<QStringList>("childStdErrLines");
QTest::addColumn<Tasks >("tasks");
// negative tests
QTest::newRow("pass-through stdout")
<< "Sometext" << OutputParserTester::STDOUT
- << "Sometext\n" << QString()
+ << QStringList("Sometext") << QStringList()
<< Tasks();
QTest::newRow("pass-through stderr")
<< "Sometext" << OutputParserTester::STDERR
- << QString() << "Sometext\n"
+ << QStringList() << QStringList("Sometext")
<< Tasks();
// positive tests
QTest::newRow("Parse error string")
<< QString::fromLatin1("main.nim(23, 1) Error: undeclared identifier: 'x'")
<< OutputParserTester::STDERR
- << QString() << QString()
+ << QStringList() << QStringList()
<< Tasks({CompileTask(Task::Error,
"Error: undeclared identifier: 'x'",
FilePath::fromUserInput("main.nim"), 23)});
@@ -84,7 +84,7 @@ void NimParserTest::testNimParser_data()
QTest::newRow("Parse warning string")
<< QString::fromLatin1("lib/pure/parseopt.nim(56, 34) Warning: quoteIfContainsWhite is deprecated [Deprecated]")
<< OutputParserTester::STDERR
- << QString() << QString()
+ << QStringList() << QStringList()
<< Tasks({CompileTask(Task::Warning,
"Warning: quoteIfContainsWhite is deprecated [Deprecated]",
FilePath::fromUserInput("lib/pure/parseopt.nim"), 56)});
@@ -97,8 +97,8 @@ void NimParserTest::testNimParser()
QFETCH(QString, input);
QFETCH(OutputParserTester::Channel, inputChannel);
QFETCH(Tasks, tasks);
- QFETCH(QString, childStdOutLines);
- QFETCH(QString, childStdErrLines);
+ QFETCH(QStringList, childStdOutLines);
+ QFETCH(QStringList, childStdErrLines);
testbench.testParsing(input, inputChannel, tasks, childStdOutLines, childStdErrLines);
}