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

Method operators

plugins/qmakemanager/parser/tests/lexertest.cpp:278–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278void LexerTest::operators()
279{
280 QFETCH(QString, project);
281 QFETCH(QList<QVariant>, expectedtokens);
282 QFETCH(QList<QVariant>, expectedbegins);
283 QFETCH(QList<QVariant>, expectedends);
284 QMake::Lexer l(nullptr, project);
285 QList<QVariant> tokens;
286 QList<QVariant> begins;
287 QList<QVariant> ends;
288 int token = 0;
289 do {
290 token = l.nextTokenKind();
291 tokens << token;
292 begins << qulonglong(l.tokenBegin());
293 ends << qulonglong(l.tokenEnd());
294 } while (token != 0);
295 tokens.removeLast();
296 begins.removeLast();
297 ends.removeLast();
298
299 qDebug() << project;
300 qDebug() << tokens << expectedtokens;
301 qDebug() << begins << expectedbegins;
302 qDebug() << ends << expectedends;
303 QVERIFY(tokens == expectedtokens);
304 QVERIFY(begins == expectedbegins);
305 QVERIFY(ends == expectedends);
306}
307
308void LexerTest::operators_data()
309{

Callers

nothing calls this directly

Calls 3

nextTokenKindMethod · 0.80
tokenBeginMethod · 0.80
tokenEndMethod · 0.80

Tested by

no test coverage detected