| 642 | } |
| 643 | |
| 644 | void 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 | |
| 672 | void DebuggerTestBase::testBreakOnWriteBreakpoint() |
| 673 | { |
nothing calls this directly
no test coverage detected