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

Method testMatchUnbracedAsciiVariable

kdevplatform/util/tests/test_stringhandler.cpp:170–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170void TestStringHandler::testMatchUnbracedAsciiVariable()
171{
172 QFETCH(QString, str);
173 QFETCH(int, identifierBegin);
174 QFETCH(int, identifierEnd);
175
176 const auto length = identifierEnd - identifierBegin;
177 Q_ASSERT_X(length >= 0, Q_FUNC_INFO, "Wrong data.");
178 const auto match = matchPossiblyBracedAsciiVariable(QStringView{str}.sliced(identifierBegin));
179 QCOMPARE(match.length, length);
180 QCOMPARE(match.name, str.mid(identifierBegin, length));
181}
182
183void TestStringHandler::testMatchUnbracedAsciiVariable_data()
184{

Callers

nothing calls this directly

Calls 1

midMethod · 0.80

Tested by

no test coverage detected