MCPcopy Create free account
hub / github.com/KDE/kdevelop / testKF6App

Method testKF6App

plugins/cmake/tests/test_cmakemanager.cpp:171–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

169}
170
171void TestCMakeManager::testKF6App()
172{
173 IProject* project = loadProject(QStringLiteral("kf6_app"));
174
175 Path mainCpp(project->path(), QStringLiteral("main.cpp"));
176 QVERIFY(QFile::exists(mainCpp.toLocalFile()));
177 const QList<ProjectBaseItem*> items = project->itemsForPath(IndexedString(mainCpp.pathOrUrl()));
178 QCOMPARE(items.size(), 2); // once the plain file, once the target
179
180 bool foundCore = false, foundGui = false, foundWidgets = false, foundWidgetsAddons = false;
181 for (ProjectBaseItem* mainCppItem : items) {
182 const Path::List includeDirs = project->buildSystemManager()->includeDirectories(mainCppItem);
183 qDebug() << "xxxxxxxxx" << includeDirs;
184 for (const Path& include : includeDirs) {
185 QString filename = include.lastPathSegment();
186 foundCore |= filename == QLatin1String("QtCore");
187 foundGui |= filename == QLatin1String("QtGui");
188 foundWidgets |= filename == QLatin1String("QtWidgets");
189 foundWidgetsAddons |= filename == QLatin1String("KWidgetsAddons");
190 }
191 }
192 QVERIFY(foundCore);
193 QVERIFY(foundGui);
194 QVERIFY(foundWidgets);
195 QVERIFY(foundWidgetsAddons);
196}
197
198void TestCMakeManager::testDefines()
199{

Callers

nothing calls this directly

Calls 10

toLocalFileMethod · 0.80
pathOrUrlMethod · 0.80
buildSystemManagerMethod · 0.80
lastPathSegmentMethod · 0.80
loadProjectFunction · 0.70
IndexedStringClass · 0.50
pathMethod · 0.45
itemsForPathMethod · 0.45
sizeMethod · 0.45
includeDirectoriesMethod · 0.45

Tested by

no test coverage detected