| 181 | } |
| 182 | |
| 183 | void TestDetectedProblem::testPluginName() |
| 184 | { |
| 185 | DetectedProblem p1(QStringLiteral("Plugin1")); |
| 186 | DetectedProblem p2(QStringLiteral("Plugin2")); |
| 187 | DetectedProblem p3(QStringLiteral("")); |
| 188 | DetectedProblem p4; |
| 189 | |
| 190 | QCOMPARE(p1.source(), IProblem::Plugin); |
| 191 | QCOMPARE(p2.source(), IProblem::Plugin); |
| 192 | QCOMPARE(p3.source(), IProblem::Plugin); |
| 193 | QCOMPARE(p4.source(), IProblem::Unknown); |
| 194 | |
| 195 | QCOMPARE(p1.sourceString(), QStringLiteral("Plugin1")); |
| 196 | QCOMPARE(p2.sourceString(), QStringLiteral("Plugin2")); |
| 197 | QCOMPARE(p3.sourceString(), QStringLiteral("")); |
| 198 | QCOMPARE(p4.sourceString(), i18n("Unknown")); |
| 199 | |
| 200 | p4.setSource(IProblem::Plugin); |
| 201 | QCOMPARE(p4.source(), IProblem::Plugin); |
| 202 | QCOMPARE(p4.sourceString(), i18n("Plugin")); |
| 203 | } |
| 204 | |
| 205 | QTEST_MAIN(TestDetectedProblem) |
| 206 |
nothing calls this directly
no test coverage detected