summaryrefslogtreecommitdiff
path: root/tests/unit/unittest/projectupdater-test.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2017-08-29 12:54:10 +0200
committerMarco Bubke <marco.bubke@qt.io>2017-08-29 16:36:57 +0000
commit8640ef19278139ddee27b93eda1e57b9b51bddfa (patch)
tree912e3ba0ae900d5013bed52a295ed4f8e0eb8a91 /tests/unit/unittest/projectupdater-test.cpp
parent7c0331ab93ff6096a2b7742688e171ddc99ed269 (diff)
downloadqt-creator-8640ef19278139ddee27b93eda1e57b9b51bddfa.tar.gz
Utils: Convert to SmallStringView for comparison
Change-Id: I38d9716225b81091e8e75b26c9c2258a2aefa987 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'tests/unit/unittest/projectupdater-test.cpp')
-rw-r--r--tests/unit/unittest/projectupdater-test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/unittest/projectupdater-test.cpp b/tests/unit/unittest/projectupdater-test.cpp
index 39ddc4ff14..98cb1b05d8 100644
--- a/tests/unit/unittest/projectupdater-test.cpp
+++ b/tests/unit/unittest/projectupdater-test.cpp
@@ -65,10 +65,10 @@ protected:
Utils::SmallString projectPartId2{"project2"};
Utils::PathStringVector headerPaths = {"/path/to/header1.h", "/path/to/header2.h"};
Utils::PathStringVector sourcePaths = {"/path/to/source1.cpp", "/path/to/source2.cpp"};
- CppTools::ProjectFile header1ProjectFile{headerPaths[0], CppTools::ProjectFile::CXXHeader};
- CppTools::ProjectFile header2ProjectFile{headerPaths[1], CppTools::ProjectFile::CXXHeader};
- CppTools::ProjectFile source1ProjectFile{sourcePaths[0], CppTools::ProjectFile::CXXSource};
- CppTools::ProjectFile source2ProjectFile{sourcePaths[1], CppTools::ProjectFile::CXXSource};
+ CppTools::ProjectFile header1ProjectFile{QString(headerPaths[0]), CppTools::ProjectFile::CXXHeader};
+ CppTools::ProjectFile header2ProjectFile{QString(headerPaths[1]), CppTools::ProjectFile::CXXHeader};
+ CppTools::ProjectFile source1ProjectFile{QString(sourcePaths[0]), CppTools::ProjectFile::CXXSource};
+ CppTools::ProjectFile source2ProjectFile{QString(sourcePaths[1]), CppTools::ProjectFile::CXXSource};
CppTools::ProjectPart projectPart;
ProjectPartContainer expectedContainer;
FileContainer generatedFile{{"/path/to", "header1.h"}, "content", {}};
@@ -92,7 +92,7 @@ TEST_F(ProjectUpdater, CallRemovePchProjectParts)
EXPECT_CALL(mockPchManagerServer, removePchProjectParts(message));
- updater.removeProjectParts({projectPartId, projectPartId2});
+ updater.removeProjectParts({QString(projectPartId), QString(projectPartId2)});
}
TEST_F(ProjectUpdater, CallPrecompiledHeaderRemoved)
@@ -102,7 +102,7 @@ TEST_F(ProjectUpdater, CallPrecompiledHeaderRemoved)
EXPECT_CALL(mockPchManagerNotifier, precompiledHeaderRemoved(projectPartId.toQString()));
EXPECT_CALL(mockPchManagerNotifier, precompiledHeaderRemoved(projectPartId2.toQString()));
- updater.removeProjectParts({projectPartId, projectPartId2});
+ updater.removeProjectParts({QString(projectPartId), QString(projectPartId2)});
}
TEST_F(ProjectUpdater, ConvertProjectPartToProjectPartContainer)
@@ -134,7 +134,7 @@ void ProjectUpdater::SetUp()
projectPart.files.push_back(header2ProjectFile);
projectPart.files.push_back(source1ProjectFile);
projectPart.files.push_back(source2ProjectFile);
- projectPart.displayName = projectPartId;
+ projectPart.displayName = QString(projectPartId);
Utils::SmallStringVector arguments{ClangPchManager::ProjectUpdater::compilerArguments(
&projectPart)};