| 497 | } |
| 498 | |
| 499 | void TestProblems::testSeverity_data() |
| 500 | { |
| 501 | QTest::addColumn<QByteArray>("code"); |
| 502 | QTest::addColumn<IProblem::Severity>("severity"); |
| 503 | |
| 504 | QTest::newRow("error") << QByteArray("class foo {}") << IProblem::Error; |
| 505 | QTest::newRow("warning") << QByteArray("int main() { int foo = 1 / 0; return foo; }") << IProblem::Warning; |
| 506 | QTest::newRow("hint-unused-variable") << QByteArray("int main() { int foo = 0; return 0; }") << IProblem::Hint; |
| 507 | QTest::newRow("hint-unused-parameter") << QByteArray("int main(int argc, char**) { return 0; }") << IProblem::Hint; |
| 508 | } |
| 509 | |
| 510 | #include "moc_test_problems.cpp" |