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

Method singleDirectory

kdevplatform/shell/tests/test_projectcontroller.cpp:402–426  ·  view source on GitHub ↗

command

Source from the content-addressed store, hash-verified

400
401// command
402void TestProjectController::singleDirectory()
403{
404 // verify that the project model contains a single folder in the
405 // top folder. First setup a FakeFileManager with this folder
406
407 m_projCtrl->openProject(m_projFilePath.toUrl());
408 WAIT_FOR_OPEN_SIGNAL;
409 auto* proj = assertProjectOpened(m_projName);
410
411 Path folderPath = Path(m_projFolder, QStringLiteral("foobar/"));
412 FakeFileManager* fileMng = createFileManager();
413 fileMng->addSubFolderTo(m_projFolder, folderPath);
414
415 proj->setManagerPlugin(fileMng);
416 proj->reloadModel();
417 QTest::qWait(100);
418
419 ProjectFolderItem* rootFolder;
420 ASSERT_SINGLE_PROJECT_IN_MODEL(rootFolder);
421
422 // check that the project contains a single subfolder
423 ProjectFolderItem* sub;
424 ASSERT_SINGLE_SUBFOLDER_IN(rootFolder, "foobar", folderPath, sub);
425 QCOMPARE(sub->rowCount(), 0);
426}
427
428// command
429void TestProjectController::fileInSubdirectory()

Callers

nothing calls this directly

Calls 7

addSubFolderToMethod · 0.80
setManagerPluginMethod · 0.80
reloadModelMethod · 0.80
PathClass · 0.50
openProjectMethod · 0.45
toUrlMethod · 0.45
rowCountMethod · 0.45

Tested by

no test coverage detected