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

Method testFixits

plugins/clang/tests/test_problems.cpp:170–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168 * Provides a list of possible fixits: http://blog.llvm.org/2010/04/amazing-feats-of-clang-error-recovery.html
169 */
170void 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
189void TestProblems::testFixits_data()
190{

Callers

nothing calls this directly

Calls 7

allFixitsMethod · 0.80
parseFunction · 0.70
descriptionMethod · 0.45
lastMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
solutionAssistantMethod · 0.45

Tested by

no test coverage detected