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

Method testUpdateBreakpoint

plugins/lldb/unittests/test_lldb.cpp:114–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void LldbTest::testUpdateBreakpoint()
115{
116 // Description: user might insert breakpoints using lldb console. model should
117 // pick up the manually set breakpoint
118 auto *session = new TestDebugSession;
119 TestLaunchConfiguration cfg;
120
121 // breakpoint 1: real line 29: foo();
122 auto* b = breakpoints()->addCodeBreakpoint(debugeeUrl(), 28);
123 QCOMPARE(breakpoints()->rowCount(), 1);
124
125 ActiveStateSessionSpy sessionSpy(session);
126 START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy);
127 QCOMPARE(currentMiLine(session), 29);
128
129 STEP_INTO_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
130 QCOMPARE(session->currentLine(), 23-1); // at the beginning of foo():23: ++i;
131
132 session->addUserCommand(QStringLiteral("break set --file %1 --line %2").arg(debugeeFilePath()).arg(33));
133 QTRY_COMPARE(breakpoints()->rowCount(), 2);
134
135 b = breakpoints()->breakpoint(1);
136 QCOMPARE(b->url(), debugeeUrl());
137 QCOMPARE(b->line(), 33-1);
138
139 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
140 QCOMPARE(session->currentLine(), 33-1);
141
142 session->run();
143 WAIT_FOR_STATE(session, DebugSession::EndedState);
144}
145
146void LldbTest::testManualBreakpoint()
147{

Callers

nothing calls this directly

Calls 9

currentMiLineFunction · 0.85
currentLineMethod · 0.80
addUserCommandMethod · 0.80
breakpointMethod · 0.80
addCodeBreakpointMethod · 0.45
rowCountMethod · 0.45
urlMethod · 0.45
lineMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected