| 55 | }; |
| 56 | |
| 57 | void 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 | |
| 81 | struct Severity |
| 82 | { |
nothing calls this directly
no test coverage detected