use of com.redhat.ceylon.compiler.SystemErrorException in project ceylon-compiler by ceylon.
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(), options("--src=test/src", "com.redhat.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 com.redhat.ceylon.compiler.SystemErrorException in project ceylon-compiler by ceylon.
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(), options("--src=test/src", "com.redhat.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