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

Method testRelativePaths

plugins/cmake/tests/test_cmakemanager.cpp:83–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void TestCMakeManager::testRelativePaths()
84{
85 IProject* project = loadProject(QStringLiteral("relative_paths"), QStringLiteral("/out"));
86
87 Path codeCpp(project->path(), QStringLiteral("../src/code.cpp"));
88 QVERIFY(QFile::exists( codeCpp.toLocalFile()));
89 QList< ProjectBaseItem* > items = project->itemsForPath(IndexedString(codeCpp.pathOrUrl()));
90 QCOMPARE(items.size(), 1); // once in the target
91 ProjectBaseItem* fooCppItem = items.first();
92
93 Path::List includeDirs = project->buildSystemManager()->includeDirectories(fooCppItem);
94
95 Path incDir(project->path(), QStringLiteral("../inc/"));
96 QVERIFY(includeDirs.contains( incDir ));
97}
98
99void TestCMakeManager::testTargetIncludePaths()
100{

Callers

nothing calls this directly

Calls 11

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

Tested by

no test coverage detected