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

Method testQByteArray

plugins/lldb/unittests/test_lldbformatters.cpp:306–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

304}
305
306void LldbFormattersTest::testQByteArray()
307{
308 TestLaunchConfiguration cfg(QStringLiteral("debuggee_qbytearray"));
309 addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("qbytearray.cpp")), 4);
310
311 QVERIFY(m_session->startDebugging(&cfg, m_iface));
312 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
313
314 // Should be two rows ('auto', 'local')
315 QCOMPARE(variableCollection()->rowCount(), 2);
316
317 variableCollection()->expanded(localVariableIndexAt(0));
318 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
319
320 QStringList charlist {
321 R"(-26 '\xe6')",
322 R"(-104 '\x98')",
323 R"(-81 '\xaf')",
324 R"(39 ''')",
325 R"(34 '"')",
326 R"(92 '\')",
327 R"(117 'u')",
328 R"(54 '6')",
329 R"(50 '2')",
330 R"(49 '1')",
331 R"(49 '1')",
332 };
333
334 VERIFY_LOCAL(0, "ba", R"("\xe6\x98\xaf'\"\\u6211")", charlist);
335
336 m_session->stepOver();
337 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
338 QCOMPARE(m_session->currentLine(), 5);
339
340 charlist << QStringLiteral("120 'x'");
341 VERIFY_LOCAL(0, "ba", R"("\xe6\x98\xaf'\"\\u6211x")", charlist);
342
343 m_session->run();
344 WAIT_FOR_STATE(m_session, DebugSession::EndedState);
345}
346
347
348void LldbFormattersTest::testQListContainer_data()

Callers

nothing calls this directly

Calls 8

findSourceFileFunction · 0.85
variableCollectionFunction · 0.85
startDebuggingMethod · 0.80
currentLineMethod · 0.80
rowCountMethod · 0.45
expandedMethod · 0.45
stepOverMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected