use of org.ballerinalang.util.debugger.dto.BreakPointDTO 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.util.debugger.dto.BreakPointDTO 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.util.debugger.dto.BreakPointDTO 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);
}
use of org.ballerinalang.util.debugger.dto.BreakPointDTO in project ballerina by ballerina-lang.
the class VMDebuggerTest method testTryCatchScenarioForPath.
@Test(description = "Testing try catch finally scenario for path")
public void testTryCatchScenarioForPath() {
BreakPointDTO[] breakPoints = Util.createBreakNodeLocations(".", "try-catch-finally.bal", 19);
String file = "try-catch-finally.bal";
List<DebugPoint> debugPoints = new ArrayList<>();
debugPoints.add(Util.createDebugPoint(".", file, 19, STEP_IN, 1));
debugPoints.add(Util.createDebugPoint(".", file, 27, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 29, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 31, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 32, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 33, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 34, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 35, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 43, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 44, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 45, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 50, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 55, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 56, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 58, STEP_OVER, 1));
debugPoints.add(Util.createDebugPoint(".", file, 60, RESUME, 1));
ExpectedResults expRes = new ExpectedResults(debugPoints, 16);
VMDebuggerUtil.startDebug("test-src/debugger/try-catch-finally.bal", breakPoints, expRes);
}
Aggregations