| 210 | } |
| 211 | |
| 212 | void 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 | |
| 227 | void TestClangUtils::testGetRawContents_data() |
| 228 | { |
nothing calls this directly
no test coverage detected