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

Method testDuchainFilter

plugins/quickopen/tests/test_quickopen.cpp:84–103  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void TestQuickOpen::testDuchainFilter()
85{
86 QFETCH(ItemList, items);
87 QFETCH(QString, filter);
88 QFETCH(ItemList, filtered);
89
90 auto toStringList = [](const ItemList& items) {
91 QStringList result;
92 for (const DUChainItem& item: items) {
93 result << item.m_text;
94 }
95
96 return result;
97 };
98
99 TestFilter filterItems;
100 filterItems.setItems(items);
101 filterItems.setFilter(filter);
102 QCOMPARE(toStringList(filterItems.filteredItems()), toStringList(filtered));
103}
104
105void TestQuickOpen::testDuchainFilter_data()
106{

Callers

nothing calls this directly

Calls 2

setItemsMethod · 0.45
setFilterMethod · 0.45

Tested by

no test coverage detected