Search in sources :

Example 6 with NodeJsOutput

use of org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput in project che by eclipse.

the class NodeJsStepParserTest method testParse.

@Test
public void testParse() throws Exception {
    NodeJsOutput nodeJsOutput = NodeJsOutput.of("break in module.js:559\n" + " 557   if (depth === 0) stat.cache = null;\n" + " 558   return result;\n" + ">559 };\n" + " 560 \n" + " 561");
    Location location = parser.parse(nodeJsOutput);
    assertEquals(location.getTarget(), "module.js");
    assertEquals(location.getLineNumber(), 559);
}
Also used : NodeJsOutput(org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput) Location(org.eclipse.che.api.debug.shared.model.Location) Test(org.testng.annotations.Test)

Example 7 with NodeJsOutput

use of org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput in project che by eclipse.

the class NodeJsBackTraceParserTest method testParse.

@Test(dataProvider = "parse")
public void testParse(String output, String script, int line) throws Exception {
    NodeJsOutput nodeJsOutput = NodeJsOutput.of(output);
    Location location = parser.parse(nodeJsOutput);
    assertEquals(location.getTarget(), script);
    assertEquals(location.getLineNumber(), line);
}
Also used : NodeJsOutput(org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput) Location(org.eclipse.che.api.debug.shared.model.Location) Test(org.testng.annotations.Test)

Aggregations

NodeJsOutput (org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput)7 Test (org.testng.annotations.Test)7 Breakpoint (org.eclipse.che.api.debug.shared.model.Breakpoint)2 Location (org.eclipse.che.api.debug.shared.model.Location)2