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

Method testQMapString

plugins/lldb/unittests/test_lldbformatters.cpp:631–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629}
630
631void LldbFormattersTest::testQMapString()
632{
633 TestLaunchConfiguration cfg(QStringLiteral("debuggee_qmapstring"));
634 addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("qmapstring.cpp")), 7);
635
636 QVERIFY(m_session->startDebugging(&cfg, m_iface));
637 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
638 QCOMPARE(m_session->currentLine(), 7); // line 8: m[QStringLiteral("30")] = QStringLiteral("300");
639
640 // Should be two rows ('auto', 'local')
641 QCOMPARE(variableCollection()->rowCount(), 2);
642
643 variableCollection()->expanded(localVariableIndexAt(0));
644 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
645
646 VERIFY_LOCAL(0, "m", "<size=2>", (QStringList{"(\"10\", \"100\")", "(\"20\", \"200\")"}));
647
648 m_session->stepOver();
649 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
650 QCOMPARE(m_session->currentLine(), 8); // line 9: return 0;
651
652 VERIFY_LOCAL(0, "m", "<size=3>",
653 (QStringList{"(\"10\", \"100\")", "(\"20\", \"200\")", "(\"30\", \"300\")"}));
654}
655
656void LldbFormattersTest::testQMapStringBool()
657{

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected