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

Method testKTextEditorTypes

plugins/lldb/unittests/test_lldbformatters.cpp:914–944  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

912}
913
914void LldbFormattersTest::testKTextEditorTypes()
915{
916 TestLaunchConfiguration cfg(QStringLiteral("debuggee_ktexteditortypes"));
917 addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("ktexteditortypes.cpp")), 8);
918
919 QVERIFY(m_session->startDebugging(&cfg, m_iface));
920 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
921
922 // Should be two rows ('auto', 'local')
923 QCOMPARE(variableCollection()->rowCount(), 2);
924
925 auto watchRoot = variableCollection()->indexForItem(variableCollection()->watches(), 0);
926 variableCollection()->expanded(watchRoot);
927 variableCollection()->variableWidgetShown();
928 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
929
930 variableCollection()->watches()->add(QStringLiteral("cursor"));
931 variableCollection()->watches()->add(QStringLiteral("range"));
932 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
933
934 QList<QPair<QString, QString>> cursorChildren;
935 cursorChildren.append({QStringLiteral("m_line"), QStringLiteral("1")});
936 cursorChildren.append({QStringLiteral("m_column"), QStringLiteral("1")});
937
938 QList<QPair<QString, QString>> rangeChildren;
939 rangeChildren.append({QStringLiteral("m_start"), QStringLiteral("(1, 1)")});
940 rangeChildren.append({QStringLiteral("m_end"), QStringLiteral("(2, 2)")});
941
942 VERIFY_WATCH(0, "cursor", "(1, 1)", cursorChildren);
943 VERIFY_WATCH(1, "range", "[(1, 1) -> (2, 2)]", rangeChildren);
944}
945
946void LldbFormattersTest::testKDevelopTypes()
947{

Callers

nothing calls this directly

Calls 9

findSourceFileFunction · 0.85
variableCollectionFunction · 0.85
startDebuggingMethod · 0.80
indexForItemMethod · 0.80
variableWidgetShownMethod · 0.80
rowCountMethod · 0.45
expandedMethod · 0.45
addMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected