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

Method testGetRawContents

plugins/clang/tests/test_clangutils.cpp:212–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

210}
211
212void TestClangUtils::testGetRawContents()
213{
214 QFETCH(QByteArray, code);
215 QFETCH(KTextEditor::Range, range);
216 QFETCH(QString, expectedContents);
217
218 QString fileName;
219 auto unit = parse(code, &fileName);
220
221 DocumentRange documentRange{IndexedString(fileName), range};
222 auto cxRange = toCXRange(unit.get(), documentRange);
223 const QString contents = ClangUtils::getRawContents(unit.get(), cxRange);
224 QCOMPARE(contents, expectedContents);
225}
226
227void TestClangUtils::testGetRawContents_data()
228{

Callers

nothing calls this directly

Calls 4

toCXRangeFunction · 0.85
parseFunction · 0.70
IndexedStringClass · 0.50
getMethod · 0.45

Tested by

no test coverage detected