use of org.eclipse.ceylon.compiler.SystemErrorException in project ceylon by eclipse.
the class CompilerToolTests method testCompileWithOomeException.
@Test
public void testCompileWithOomeException() throws Exception {
ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
Assert.assertNotNull(model);
CeylonCompileTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--src=test/src", "org.eclipse.ceylon.tools.test.oome"));
try {
tool.run();
Assert.fail("Tool should have thrown an exception");
} catch (SystemErrorException x) {
Assert.assertEquals("java.lang.OutOfMemoryError", x.getMessage());
}
}
use of org.eclipse.ceylon.compiler.SystemErrorException in project ceylon by eclipse.
the class CompilerToolTests method testCompileWithStackOverflowError.
@Test
public void testCompileWithStackOverflowError() throws Exception {
ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
Assert.assertNotNull(model);
CeylonCompileTool tool = pluginFactory.bindArguments(model, getMainTool(), toolOptions("--src=test/src", "org.eclipse.ceylon.tools.test.stackoverflow"));
try {
tool.run();
Assert.fail("Tool should have thrown an exception");
} catch (SystemErrorException x) {
Assert.assertEquals("java.lang.StackOverflowError", x.getMessage());
}
}
Aggregations