| 168 | * Provides a list of possible fixits: http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html |
| 169 | */ |
| 170 | void TestProblems::testFixits() |
| 171 | { |
| 172 | QFETCH(QString, code); |
| 173 | QFETCH(int, problemsCount); |
| 174 | QFETCH(QVector<ClangFixit>, fixits); |
| 175 | |
| 176 | auto problems = parse(code.toLatin1()); |
| 177 | |
| 178 | qDebug() << problems.last()->description(); |
| 179 | QCOMPARE(problems.size(), problemsCount); |
| 180 | |
| 181 | const ClangProblem* p1 = dynamic_cast<ClangProblem*>(problems[0].data()); |
| 182 | QVERIFY(p1); |
| 183 | auto* a1 = qobject_cast<ClangFixitAssistant*>(p1->solutionAssistant().data()); |
| 184 | QVERIFY(a1); |
| 185 | |
| 186 | QCOMPARE(p1->allFixits(), fixits); |
| 187 | } |
| 188 | |
| 189 | void TestProblems::testFixits_data() |
| 190 | { |
nothing calls this directly
no test coverage detected