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

Method testVariablesLocals

plugins/lldb/unittests/test_lldb.cpp:267–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void LldbTest::testVariablesLocals()
268{
269 auto *session = new TestDebugSession;
270 TestLaunchConfiguration cfg;
271
272 session->variableController()->setAutoUpdate(IVariableController::UpdateLocals);
273
274 breakpoints()->addCodeBreakpoint(debugeeUrl(), 24);
275 ActiveStateSessionSpy sessionSpy(session);
276 START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy);
277
278 QCOMPARE(variableCollection()->rowCount(), 2);
279 QModelIndex i = variableCollection()->index(1, 0);
280 COMPARE_DATA(i, VariableCollection::defaultLocalsSectionTitle());
281
282 QCOMPARE(variableCollection()->rowCount(i), 1);
283 COMPARE_DATA(variableCollection()->index(0, 0, i), "j");
284 COMPARE_DATA(variableCollection()->index(0, 1, i), "1");
285
286 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
287
288 COMPARE_DATA(variableCollection()->index(0, 0, i), "j");
289 COMPARE_DATA(variableCollection()->index(0, 1, i), "2");
290
291 session->run();
292 WAIT_FOR_STATE(session, DebugSession::EndedState);
293}
294
295void LldbTest::testVariablesWatchesQuotes()
296{

Callers

nothing calls this directly

Calls 7

variableCollectionFunction · 0.85
setAutoUpdateMethod · 0.80
variableControllerMethod · 0.45
addCodeBreakpointMethod · 0.45
rowCountMethod · 0.45
indexMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected