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

Method testGetRawContents_data

plugins/clang/tests/test_clangutils.cpp:227–253  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void TestClangUtils::testGetRawContents_data()
228{
229 QTest::addColumn<QByteArray>("code");
230 QTest::addColumn<KTextEditor::Range>("range");
231 QTest::addColumn<QString>("expectedContents");
232
233 QTest::newRow("complete")
234 << QByteArray("void; int foo = 42; void;")
235 << KTextEditor::Range(0, 6, 0, 19)
236 << "int foo = 42;";
237 QTest::newRow("cut-off-at-start")
238 << QByteArray("void; int foo = 42; void;")
239 << KTextEditor::Range(0, 7, 0, 19)
240 << "nt foo = 42;";
241 QTest::newRow("cut-off-at-end")
242 << QByteArray("void; int foo = 42; void;")
243 << KTextEditor::Range(0, 6, 0, 17)
244 << "int foo = 4";
245 QTest::newRow("whitespace")
246 << QByteArray("void; int ; void;")
247 << KTextEditor::Range(0, 5, 0, 18)
248 << " int ";
249 QTest::newRow("empty-range")
250 << QByteArray("void;")
251 << KTextEditor::Range(0, 0, 0, 0)
252 << "";
253}
254
255void TestClangUtils::testRangeForIncludePathSpec()
256{

Callers

nothing calls this directly

Calls 2

QByteArrayClass · 0.50
RangeClass · 0.50

Tested by

no test coverage detected