Compares the node and it's children to a reference problem and it's diagnostics
| 142 | |
| 143 | // Compares the node and it's children to a reference problem and it's diagnostics |
| 144 | bool checkDiagnodes(const ProblemStoreNode *node, const IProblem::Ptr &reference) |
| 145 | { |
| 146 | const auto *problemNode = dynamic_cast<const ProblemNode*>(node); |
| 147 | MYVERIFY(problemNode); |
| 148 | MYCOMPARE(problemNode->problem()->description(), reference->description()); |
| 149 | MYCOMPARE(problemNode->problem()->finalLocation().document.str(), reference->finalLocation().document.str()); |
| 150 | MYCOMPARE(problemNode->count(), 1); |
| 151 | |
| 152 | const IProblem::Ptr diag = reference->diagnostics().at(0); |
| 153 | const auto *diagNode = dynamic_cast<const ProblemNode*>(problemNode->child(0)); |
| 154 | MYVERIFY(diagNode); |
| 155 | MYCOMPARE(diagNode->problem()->description(), diag->description()); |
| 156 | MYCOMPARE(diagNode->count(), 1); |
| 157 | |
| 158 | const IProblem::Ptr diagdiag = diag->diagnostics().at(0); |
| 159 | const auto *diagdiagNode = dynamic_cast<const ProblemNode*>(diagNode->child(0)); |
| 160 | MYVERIFY(diagdiagNode); |
| 161 | MYCOMPARE(diagdiagNode->problem()->description(), diagdiag->description()); |
| 162 | MYCOMPARE(diagdiagNode->count(), 0); |
| 163 | |
| 164 | return true; |
| 165 | } |
| 166 | |
| 167 | void TestFilteredProblemStore::testNoGrouping() |
| 168 | { |
no test coverage detected