assertEquals(1, MVEL.executeDebugger(compiled, null, new MapVariableResolverFactory(createTestMap())));
assertTrue("Debugger did not break at line 9", linesEncountered.contains(9));
}
public void testBreakpointsAcrossComments2() {
ExpressionCompiler compiler = new ExpressionCompiler(
"// This is a comment\n" + // 1
"//Second comment line\n" + // 2
"//Third Comment Line\n" + // 3
"\n" + // 4
"//Test\n" + // 5
"System.out.println('4');\n" + // 6
"//System.out.println('5'); \n" + // 7
"a = 0;\n" + // 8
"b = 1;\n" + // 9
" a + b"); // 10
ParserContext ctx = new ParserContext();
ctx.setSourceFile("test2.mv");
ctx.setDebugSymbols(true);
CompiledExpression compiled = compiler.compile(ctx);
MVELRuntime.registerBreakpoint("test2.mv", 6);
MVELRuntime.registerBreakpoint("test2.mv", 8);
MVELRuntime.registerBreakpoint("test2.mv", 9);
MVELRuntime.registerBreakpoint("test2.mv", 10);