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

Method testSource

kdevplatform/shell/tests/test_detectedproblem.cpp:57–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55};
56
57void TestDetectedProblem::testSource()
58{
59 static const Source sources[] =
60 {
61 { IProblem::Unknown, i18n("Unknown") },
62 { IProblem::Disk, i18n("Disk") },
63 { IProblem::Preprocessor, i18n("Preprocessor") },
64 { IProblem::Lexer, i18n("Lexer") },
65 { IProblem::Parser, i18n("Parser") },
66 { IProblem::DUChainBuilder, i18n("DuchainBuilder") },
67 { IProblem::SemanticAnalysis, i18n("Semantic analysis") },
68 { IProblem::ToDo, i18n("Todo") },
69 { IProblem::Plugin, i18n("Plugin") }
70 };
71
72 for (auto& source : sources) {
73 m_problem->setSource(source.source);
74
75 QCOMPARE(source.source, m_problem->source());
76 QCOMPARE(source.sourceString, m_problem->sourceString());
77 }
78
79}
80
81struct Severity
82{

Callers

nothing calls this directly

Calls 3

setSourceMethod · 0.45
sourceMethod · 0.45
sourceStringMethod · 0.45

Tested by

no test coverage detected