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

Method testActivation

kdevplatform/shell/tests/test_shellbuddy.cpp:174–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172}
173
174void TestShellBuddy::testActivation()
175{
176 QCOMPARE(m_documentController->openDocuments().count(), 0);
177
178 enableBuddies();
179 enableOpenAfterCurrent();
180
181 QTemporaryDir dirA;
182 createFile(dirA, QStringLiteral("a.l.txt"));
183 createFile(dirA, QStringLiteral("a.r.txt"));
184 createFile(dirA, QStringLiteral("b.r.txt"));
185
186 m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.r.txt"));
187 m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "a.l.txt"));
188 verifyFilename(m_uiController->activeSublimeWindow()->activeView(), "a.l.txt");
189
190 m_documentController->openDocument(QUrl::fromLocalFile(dirA.path() + "b.r.txt"));
191 verifyFilename(m_uiController->activeSublimeWindow()->activeView(), "b.r.txt");
192
193 QCOMPARE(m_documentController->openDocuments().count(), 3);
194 for(int i = 0; i < 3; i++)
195 m_documentController->openDocuments().at(0)->close(IDocument::Discard);
196 QCOMPARE(m_documentController->openDocuments().count(), 0);
197}
198
199
200void TestShellBuddy::testDisableBuddies()

Callers

nothing calls this directly

Calls 9

openDocumentsMethod · 0.80
activeSublimeWindowMethod · 0.80
createFileFunction · 0.50
countMethod · 0.45
openDocumentMethod · 0.45
pathMethod · 0.45
activeViewMethod · 0.45
closeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected