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

Method testItemsForPath_data

kdevplatform/project/tests/test_projectmodel.cpp:478–499  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

476}
477
478void TestProjectModel::testItemsForPath_data()
479{
480 QTest::addColumn<Path>("path");
481 QTest::addColumn<ProjectBaseItem*>("root");
482 QTest::addColumn<int>("matches");
483
484 {
485 auto* root = new ProjectFolderItem(nullptr, Path(QUrl::fromLocalFile(QDir::tempPath())));
486 auto* file = new ProjectFileItem(QStringLiteral("a"), root);
487 QTest::newRow("find one") << file->path() << static_cast<ProjectBaseItem*>(root) << 1;
488 }
489
490 {
491 auto* root = new ProjectFolderItem(nullptr, Path(QUrl::fromLocalFile(QDir::tempPath())));
492 auto* folder = new ProjectFolderItem(QStringLiteral("a"), root);
493 auto* file = new ProjectFileItem(QStringLiteral("foo"), folder);
494 auto* target = new ProjectTargetItem(nullptr, QStringLiteral("b"), root);
495 auto* file2 = new ProjectFileItem(nullptr, file->path(), target);
496 Q_UNUSED(file2);
497 QTest::newRow("find two") << file->path() << static_cast<ProjectBaseItem*>(root) << 2;
498 }
499}
500
501void TestProjectModel::testProjectProxyModel()
502{

Callers

nothing calls this directly

Calls 2

PathClass · 0.50
pathMethod · 0.45

Tested by

no test coverage detected