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

Method testConditionBreakpoint

plugins/debuggercommon/tests/debuggertestbase.cpp:644–670  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

642}
643
644void DebuggerTestBase::testConditionBreakpoint()
645{
646 auto* const session = createTestDebugSession();
647 TestLaunchConfiguration cfg;
648
649 auto* breakpoint = addDebugeeBreakpoint(40);
650 breakpoint->setCondition("x[0] == 'H'");
651
652 breakpoint = addDebugeeBreakpoint(24);
653 breakpoint->setCondition("i==2");
654
655 breakpoint = addDebugeeBreakpoint(25);
656 ActiveStateSessionSpy sessionSpy(session);
657 START_DEBUGGING_AND_WAIT_FOR_PAUSED_STATE_E(session, cfg, sessionSpy);
658 QCOMPARE(currentMiLine(session), 25);
659
660 breakpoint->setCondition("i == 0");
661
662 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
663 QCOMPARE(currentMiLine(session), 24);
664
665 CONTINUE_AND_WAIT_FOR_PAUSED_STATE(session, sessionSpy);
666 QCOMPARE(currentMiLine(session), 40);
667
668 session->run();
669 WAIT_FOR_STATE(session, IDebugSession::EndedState);
670}
671
672void DebuggerTestBase::testBreakOnWriteBreakpoint()
673{

Callers

nothing calls this directly

Calls 3

currentMiLineFunction · 0.85
setConditionMethod · 0.80
runMethod · 0.45

Tested by

no test coverage detected