| 27 | using namespace KDevelop; |
| 28 | |
| 29 | class TestProblemModel : public QObject |
| 30 | { |
| 31 | Q_OBJECT |
| 32 | private Q_SLOTS: |
| 33 | void initTestCase(); |
| 34 | void cleanupTestCase(); |
| 35 | |
| 36 | void testNoGrouping(); |
| 37 | void testPathGrouping(); |
| 38 | void testSeverityGrouping(); |
| 39 | void testPlaceholderText(); |
| 40 | |
| 41 | private: |
| 42 | QString prependPathRoot(QString const& currentPath) const; |
| 43 | void generateProblems(); |
| 44 | bool checkIsSame(int row, const QModelIndex &parent, const IProblem::Ptr &problem); |
| 45 | bool checkDiagnostics(int row, const QModelIndex &parent); |
| 46 | bool checkDisplay(int row, const QModelIndex &parent, const IProblem::Ptr &problem); |
| 47 | bool checkLabel(int row, const QModelIndex &parent, const QString &label); |
| 48 | bool checkPathGroup(int row, const IProblem::Ptr &problem); |
| 49 | bool checkSeverityGroup(int row, const IProblem::Ptr &problem); |
| 50 | |
| 51 | QScopedPointer<ProblemModel> m_model; |
| 52 | QVector<IProblem::Ptr> m_problems; |
| 53 | IProblem::Ptr m_diagnosticTestProblem; |
| 54 | }; |
| 55 | |
| 56 | void TestProblemModel::initTestCase() |
| 57 | { |
nothing calls this directly
no test coverage detected