diff options
author | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-04-05 11:53:16 +0200 |
---|---|---|
committer | Ivan Donchevskii <ivan.donchevskii@qt.io> | 2019-04-18 14:29:07 +0000 |
commit | 9d4c7b1c42bf8f0a834a7517ecd8266a3a416c5b (patch) | |
tree | dbe533ffe39b50ad34f4e46c7959d1554e950ec7 | |
parent | 43d83f2a69ff7b74012368e14098f3fa14e7acc6 (diff) |
Unit-test: Fix build
Change-Id: Id89bbd391117d998bb6e8d4607786ac48580a7f4
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
-rw-r--r-- | tests/unit/unittest/headerpathfilter-test.cpp | 8 | ||||
-rw-r--r-- | tests/unit/unittest/unittest.pro | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tests/unit/unittest/headerpathfilter-test.cpp b/tests/unit/unittest/headerpathfilter-test.cpp index 00ab6626d4..7caa3a15dc 100644 --- a/tests/unit/unittest/headerpathfilter-test.cpp +++ b/tests/unit/unittest/headerpathfilter-test.cpp @@ -37,7 +37,7 @@ MATCHER_P(HasBuiltIn, std::string(negation ? "isn't " : "is ") + PrintToString(HeaderPath{QString::fromUtf8(path), HeaderPathType::BuiltIn})) { - return arg.path == QString(path) && arg.type == HeaderPathType::BuiltIn; + return arg.path == QString::fromUtf8(path) && arg.type == HeaderPathType::BuiltIn; } MATCHER_P(HasSystem, @@ -45,7 +45,7 @@ MATCHER_P(HasSystem, std::string(negation ? "isn't " : "is ") + PrintToString(HeaderPath{QString::fromUtf8(path), HeaderPathType::System})) { - return arg.path == QString(path) && arg.type == HeaderPathType::System; + return arg.path == QString::fromUtf8(path) && arg.type == HeaderPathType::System; } MATCHER_P(HasFramework, @@ -53,7 +53,7 @@ MATCHER_P(HasFramework, std::string(negation ? "isn't " : "is ") + PrintToString(HeaderPath{QString::fromUtf8(path), HeaderPathType::Framework})) { - return arg.path == QString(path) && arg.type == HeaderPathType::Framework; + return arg.path == QString::fromUtf8(path) && arg.type == HeaderPathType::Framework; } MATCHER_P(HasUser, @@ -61,7 +61,7 @@ MATCHER_P(HasUser, std::string(negation ? "isn't " : "is ") + PrintToString(HeaderPath{QString::fromUtf8(path), HeaderPathType::User})) { - return arg.path == QString(path) && arg.type == HeaderPathType::User; + return arg.path == QString::fromUtf8(path) && arg.type == HeaderPathType::User; } class HeaderPathFilter : public testing::Test diff --git a/tests/unit/unittest/unittest.pro b/tests/unit/unittest/unittest.pro index d6b9e08594..4fbba5b413 100644 --- a/tests/unit/unittest/unittest.pro +++ b/tests/unit/unittest/unittest.pro @@ -14,6 +14,8 @@ OBJECTS_DIR = $$OUT_PWD/obj # workaround for qmake bug in object_parallel_to_sou !msvc:force_debug_info:QMAKE_CXXFLAGS += -fno-omit-frame-pointer DEFINES += \ + QT_NO_CAST_TO_ASCII \ + QT_RESTRICTED_CAST_FROM_ASCII \ QT_USE_FAST_OPERATOR_PLUS \ QT_USE_FAST_CONCATENATION \ UNIT_TESTS \ |