use of org.ballerinalang.test.utils.debug.ExpectedResults in project ballerina by ballerina-lang.
the class VMDebuggerTest method testStepOut.
@Test(description = "Testing Step Out.")
public void testStepOut() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", FILE, 25);
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", FILE, 25, STEP_OUT, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 42, STEP_OUT, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 9, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 3);
VMDebuggerUtil.startDebug("test-src/debugger/test-debug.bal", breakPoints, expRes);
}
use of org.ballerinalang.test.utils.debug.ExpectedResults in project ballerina by ballerina-lang.
the class VMDebuggerTest method testStepOverWhileStmt.
@Test(description = "Testing Step over in WhileStmt.")
public void testStepOverWhileStmt() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", FILE, 12, 13, 19, 21);
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", FILE, 12, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 13, RESUME, 5));
debugPoints.add(Util.createDebugPoint(".", FILE, 19, RESUME, 4));
debugPoints.add(Util.createDebugPoint(".", FILE, 21, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 11);
VMDebuggerUtil.startDebug("test-src/debugger/test-debug.bal", breakPoints, expRes);
}
use of org.ballerinalang.test.utils.debug.ExpectedResults in project ballerina by ballerina-lang.
the class VMDebuggerTest method testDebuggingWorkers.
@Test(description = "Testing debug paths in workers")
public void testDebuggingWorkers() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", "test-worker.bal", 3, 9, 10, 18, 19, 23, 46);
String file = "test-worker.bal";
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", file, 3, RESUME, 1));
debugPoints.add(Util.createDebugPoint(".", file, 9, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 10, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 12, STEP_IN, 1));
debugPoints.add(Util.createDebugPoint(".", file, 31, STEP_OUT, 1));
debugPoints.add(Util.createDebugPoint(".", file, 13, RESUME, 1));
debugPoints.add(Util.createDebugPoint(".", file, 18, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 19, RESUME, 1));
debugPoints.add(Util.createDebugPoint(".", file, 46, RESUME, 5));
debugPoints.add(Util.createDebugPoint(".", file, 23, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 14);
VMDebuggerUtil.startDebug("test-src/debugger/test-worker.bal", breakPoints, expRes);
}
use of org.ballerinalang.test.utils.debug.ExpectedResults in project ballerina by ballerina-lang.
the class VMDebuggerTest method testStepOverIfStmt.
@Test(description = "Testing Step over in IfCondition.")
public void testStepOverIfStmt() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", FILE, 26);
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", FILE, 26, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 28, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 29, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 35, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 36, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", FILE, 42, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 6);
VMDebuggerUtil.startDebug("test-src/debugger/test-debug.bal", breakPoints, expRes);
}
use of org.ballerinalang.test.utils.debug.ExpectedResults in project ballerina by ballerina-lang.
the class VMDebuggerTest method testDebuggingPackageInit.
@Test(description = "Testing debug paths in package init")
public void testDebuggingPackageInit() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", "test-package-init.bal", 3, 9);
String file = "test-package-init.bal";
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", file, 3, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 5, STEP_IN, 1));
debugPoints.add(Util.createDebugPoint(".", file, 14, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 15, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 16, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 20, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 14, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 15, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 16, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 20, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 14, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 22, RESUME, 1));
debugPoints.add(Util.createDebugPoint(".", file, 9, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 13);
VMDebuggerUtil.startDebug("test-src/debugger/test-package-init.bal", breakPoints, expRes);
}
Aggregations