MCPcopy Create free account
hub / github.com/KDE/kdevelop / testPluginName

Method testPluginName

kdevplatform/shell/tests/test_detectedproblem.cpp:183–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183void 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
205QTEST_MAIN(TestDetectedProblem)
206

Callers

nothing calls this directly

Calls 3

sourceMethod · 0.45
sourceStringMethod · 0.45
setSourceMethod · 0.45

Tested by

no test coverage detected