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

Method testKDevelopTypes

plugins/lldb/unittests/test_lldbformatters.cpp:946–974  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

944}
945
946void LldbFormattersTest::testKDevelopTypes()
947{
948 TestLaunchConfiguration cfg(QStringLiteral("debuggee_kdeveloptypes"));
949 addCodeBreakpoint(QUrl::fromLocalFile(findSourceFile("kdeveloptypes.cpp")), 11);
950
951 QVERIFY(m_session->startDebugging(&cfg, m_iface));
952 WAIT_FOR_STATE_AND_IDLE(m_session, DebugSession::PausedState);
953
954 // Should be two rows ('auto', 'local')
955 QCOMPARE(variableCollection()->rowCount(), 2);
956
957 auto watchRoot = variableCollection()->indexForItem(variableCollection()->watches(), 0);
958 variableCollection()->expanded(watchRoot);
959 variableCollection()->variableWidgetShown();
960 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
961
962 variableCollection()->watches()->add(QStringLiteral("path1"));
963 variableCollection()->watches()->add(QStringLiteral("path2"));
964 WAIT_FOR_A_WHILE_AND_IDLE(m_session, 50);
965
966 QList<QPair<QString, QString>> path1Children;
967 path1Children.append({QStringLiteral("m_data"), QStringLiteral("<size=2>")});
968
969 QList<QPair<QString, QString>> path2Children;
970 path2Children.append({QStringLiteral("m_data"), QStringLiteral("<size=3>")});
971
972 VERIFY_WATCH(0, "path1", "(\"tmp\", \"foo\")", path1Children);
973 VERIFY_WATCH(1, "path2", "(\"http://www.test.com\", \"tmp\", \"asdf.txt\")", path2Children);
974}
975
976QTEST_MAIN(LldbFormattersTest)
977

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