use of org.eclipse.che.api.debug.shared.model.event.DebuggerEvent in project che by eclipse.
the class GdbDebuggerTest method stepOver.
private void stepOver() throws DebuggerException, InterruptedException {
gdbDebugger.stepOver(new StepOverActionImpl());
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
SuspendEvent suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 5);
gdbDebugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 6);
gdbDebugger.stepOver(new StepOverActionImpl());
debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getTarget(), "h.cpp");
assertEquals(suspendEvent.getLocation().getLineNumber(), 7);
}
use of org.eclipse.che.api.debug.shared.model.event.DebuggerEvent in project che by eclipse.
the class GdbDebuggerTest method stepOut.
private void stepOut() throws DebuggerException, InterruptedException {
try {
gdbDebugger.stepOut(new StepOutActionImpl());
} catch (DebuggerException e) {
// ignore
}
DebuggerEvent debuggerEvent = events.take();
assertTrue(debuggerEvent instanceof SuspendEvent);
}
use of org.eclipse.che.api.debug.shared.model.event.DebuggerEvent in project che by eclipse.
the class AbstractZendDbgSessionTest method awaitSuspend.
protected void awaitSuspend(String dbgFile, int lineNumber) throws Exception {
DebuggerEvent debuggerEvent = dbgEvents.poll(5, TimeUnit.SECONDS);
if (debuggerEvent == null) {
throw new Exception("Suspend event timeout occurred.");
}
assertTrue(debuggerEvent instanceof SuspendEvent);
SuspendEvent suspendEvent = (SuspendEvent) debuggerEvent;
assertEquals(suspendEvent.getLocation().getResourcePath(), dbgFile);
assertEquals(suspendEvent.getLocation().getLineNumber(), lineNumber);
}
use of org.eclipse.che.api.debug.shared.model.event.DebuggerEvent in project che by eclipse.
the class NodeJsDebuggerTest method testResume.
@Test
public void testResume() throws Exception {
debugger.resume(new ResumeActionImpl());
ArgumentCaptor<DebuggerEvent> eventCaptor = ArgumentCaptor.forClass(DebuggerEvent.class);
verify(callback, timeout(5000)).onEvent(eventCaptor.capture());
assertTrue(eventCaptor.getValue() != null);
assertTrue(eventCaptor.getValue() instanceof DisconnectEvent);
}
Aggregations