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

Method singleFile

kdevplatform/shell/tests/test_projectcontroller.cpp:373–399  ·  view source on GitHub ↗

command

Source from the content-addressed store, hash-verified

371
372// command
373void TestProjectController::singleFile()
374{
375 // verify that the project model contains a single file in the
376 // top folder. First setup a FakeFileManager with this file
377
378 m_projCtrl->openProject(m_projFilePath.toUrl());
379 WAIT_FOR_OPEN_SIGNAL;
380 auto* proj = assertProjectOpened(m_projName);
381
382 FakeFileManager* fileMng = createFileManager();
383 proj->setManagerPlugin(fileMng);
384
385 Path filePath = Path(m_projFolder, QStringLiteral("foobar"));
386 fileMng->addFileToFolder(m_projFolder, filePath);
387
388 proj->reloadModel();
389 QTest::qWait(100); // NO signals for reload ...
390
391 ProjectFolderItem* rootFolder;
392 ASSERT_SINGLE_PROJECT_IN_MODEL(rootFolder);
393 ProjectFileItem* fi;
394 ASSERT_SINGLE_FILE_IN(rootFolder, "foobar", filePath, fi);
395 QCOMPARE(fi->rowCount(), 0);
396
397 ASSERT_SINGLE_PROJECT_IN_MODEL(rootFolder);
398 ASSERT_SINGLE_FILE_IN(rootFolder, "foobar", filePath, fi);
399}
400
401// command
402void TestProjectController::singleDirectory()

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected