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

Method testRemoveOneProvider

plugins/qthelp/tests/test_qthelpplugin.cpp:203–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203void TestQtHelpPlugin::testRemoveOneProvider()
204{
205 QStringList path, name, icon, ghns;
206 path << VALID1 << VALID2;
207 name << QStringLiteral("file1") << QStringLiteral("file2");
208 icon << QStringLiteral("myIcon") << QStringLiteral("myIcon");
209 ghns << QStringLiteral("0") << QStringLiteral("0");
210
211 auto plugin = makePlugin(m_testCore, [&]() {
212 qtHelpWriteConfig(icon, name, path, ghns, QString(), true);
213 });
214 RETURN_IF_TEST_FAILED();
215
216 QCOMPARE(plugin->qtHelpProviderLoaded().size(), 2);
217 // we remove the second provider
218 QtHelpProvider* provider = plugin->qtHelpProviderLoaded().at(0);
219 path.removeAt(1);
220 name.removeAt(1);
221 icon.removeAt(1);
222 ghns.removeAt(1);
223 qtHelpWriteConfig(icon, name, path, ghns, QString(), true);
224 plugin->readConfig();
225
226 QCOMPARE(plugin->qtHelpProviderLoaded().size(), 1);
227 QCOMPARE(plugin->qtHelpProviderLoaded().at(0), provider);
228}
229
230void TestQtHelpPlugin::testDeclarationLookup_data()
231{

Callers

nothing calls this directly

Calls 7

makePluginFunction · 0.85
qtHelpWriteConfigFunction · 0.85
qtHelpProviderLoadedMethod · 0.80
readConfigMethod · 0.80
QStringClass · 0.50
sizeMethod · 0.45
atMethod · 0.45

Tested by

no test coverage detected