| 58 | } |
| 59 | |
| 60 | void TestCMakeManager::testIncludePaths() |
| 61 | { |
| 62 | IProject* project = loadProject(QStringLiteral("single_subdirectory")); |
| 63 | Path sourceDir = project->path(); |
| 64 | |
| 65 | Path fooCpp(sourceDir, QStringLiteral("subdir/foo.cpp")); |
| 66 | QVERIFY(QFile::exists(fooCpp.toLocalFile())); |
| 67 | QList< ProjectBaseItem* > items = project->itemsForPath(IndexedString(fooCpp.pathOrUrl())); |
| 68 | ProjectBaseItem* fooCppItem = items.first(); |
| 69 | |
| 70 | Path::List includeDirs = project->buildSystemManager()->includeDirectories(fooCppItem); |
| 71 | QVERIFY(includeDirs.size() >= 3); |
| 72 | |
| 73 | Path buildDir(project->buildSystemManager()->buildDirectory(fooCppItem)); |
| 74 | QVERIFY(includeDirs.contains(buildDir)); |
| 75 | |
| 76 | Path subBuildDir(buildDir, QStringLiteral("subdir/")); |
| 77 | QVERIFY(includeDirs.contains(subBuildDir)); |
| 78 | |
| 79 | Path subDir(sourceDir, QStringLiteral("subdir/")); |
| 80 | QVERIFY(includeDirs.contains(subDir)); |
| 81 | } |
| 82 | |
| 83 | void TestCMakeManager::testRelativePaths() |
| 84 | { |
nothing calls this directly
no test coverage detected