aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Donchevskii <ivan.donchevskii@qt.io>2018-10-09 11:02:22 +0200
committerMarco Bubke <marco.bubke@qt.io>2018-10-09 12:25:14 +0000
commit76fad7aad0e2625dbca1415f7695a0697472db56 (patch)
treed8ed1ed9a43ae45ea7613bd6bf19bd14231bff99
parentacd387651e26989b90c2b88f0c2e58d68d7a6154 (diff)
Unittest: Fix compileroptionsbuilder-test paths on Linux
Match paths partially not to construct the whole path. Change-Id: I397ac930e2d74b8eba98d1b523aabd4ed92f2aee Reviewed-by: Marco Bubke <marco.bubke@qt.io>
-rw-r--r--tests/unit/unittest/compileroptionsbuilder-test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/unit/unittest/compileroptionsbuilder-test.cpp b/tests/unit/unittest/compileroptionsbuilder-test.cpp
index 37d00dd676..1ba52dd293 100644
--- a/tests/unit/unittest/compileroptionsbuilder-test.cpp
+++ b/tests/unit/unittest/compileroptionsbuilder-test.cpp
@@ -41,7 +41,7 @@ using ProjectExplorer::Project;
MATCHER_P(IsPartOfHeader, headerPart, std::string(negation ? "isn't " : "is ") + headerPart)
{
- return arg.contains(QString::fromUtf8(headerPart));
+ return arg.contains(QString::fromStdString(headerPart));
}
class CompilerOptionsBuilderTest : public ::testing::Test
@@ -333,8 +333,8 @@ TEST_F(CompilerOptionsBuilderTest, BuildAllOptions)
"-nostdlibinc", "-c", "-m64", "-target", "x86_64-apple-darwin10",
"-arch", "x86_64", "-x", "c++", "-std=c++17", "-fcxx-exceptions",
"-fexceptions", "-Dfoo=bar", "-DprojectFoo=projectBar", "-undef",
- "-I", QDir::toNativeSeparators("D:/code/qt-creator/tests/unit/unittest/../../../share/qtcreator/cplusplus/wrappedQtHeaders"),
- "-I", QDir::toNativeSeparators("D:/code/qt-creator/tests/unit/unittest/../../../share/qtcreator/cplusplus/wrappedQtHeaders/QtCore"),
+ "-I", IsPartOfHeader("wrappedQtHeaders"),
+ "-I", IsPartOfHeader(QDir::toNativeSeparators("wrappedQtHeaders/QtCore").toStdString()),
"-I", QDir::toNativeSeparators("/tmp/path"),
"-I", QDir::toNativeSeparators("/tmp/system_path"),
"-isystem", QDir::toNativeSeparators("/tmp/builtin_path")