| 112 | } |
| 113 | |
| 114 | void TestProblemsView::testRemoveModel() |
| 115 | { |
| 116 | // Remove the model |
| 117 | ProblemModelSet* pms = ICore::self()->languageController()->problemModelSet(); |
| 118 | ProblemModel* model = pms->findModel(QStringLiteral("MODEL1_ID")); |
| 119 | QVERIFY(model); |
| 120 | pms->removeModel(QStringLiteral("MODEL1_ID")); |
| 121 | delete model; |
| 122 | model = nullptr; |
| 123 | |
| 124 | // Now let's see if the view has been updated! |
| 125 | QTabWidget* tab = tabWidget(); |
| 126 | QVERIFY(tab); |
| 127 | QCOMPARE(tab->count(), 1); |
| 128 | QCOMPARE(tab->tabText(0), QStringLiteral("MODEL2 (0)")); |
| 129 | } |
| 130 | |
| 131 | void TestProblemsView::testAddRemoveProblems() |
| 132 | { |
nothing calls this directly
no test coverage detected