MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test1

Method test1

gui/test/resultstree/testresultstree.cpp:132–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130// Test...
131
132void TestResultsTree::test1() const
133{
134 // #12772 : GUI: information messages are shown even though information tool button is deselected
135 ResultsTree tree(nullptr);
136 tree.showResults(ShowTypes::ShowType::ShowInformation, false);
137 ErrorItem errorItem;
138 errorItem.errorPath << QErrorPathItem();
139 errorItem.severity = Severity::information;
140 tree.addErrorItem(errorItem);
141 QCOMPARE(tree.isRowHidden(0,QModelIndex()), true); // Added item is hidden
142 tree.showResults(ShowTypes::ShowType::ShowInformation, true);
143 QCOMPARE(tree.isRowHidden(0,QModelIndex()), false); // Show item
144}
145
146void TestResultsTree::duplicateResults() const
147{

Callers

nothing calls this directly

Calls 4

QErrorPathItemClass · 0.85
addErrorItemMethod · 0.80
QModelIndexClass · 0.50
showResultsMethod · 0.45

Tested by

no test coverage detected