Search in sources :

Example 6 with CompilerErrorException

use of org.eclipse.ceylon.compiler.CompilerErrorException in project ceylon by eclipse.

the class CompilerToolTests method testBadIntegerLiteral.

@Test
public void testBadIntegerLiteral() 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.badintegerliteral"));
    try {
        tool.run();
        Assert.fail("Tool should have thrown an exception");
    } catch (CompilerErrorException e) {
    // We expect this, not a FatalToolError
    }
}
Also used : CeylonCompileTool(org.eclipse.ceylon.compiler.CeylonCompileTool) CompilerErrorException(org.eclipse.ceylon.compiler.CompilerErrorException) Test(org.junit.Test)

Aggregations

CeylonCompileTool (org.eclipse.ceylon.compiler.CeylonCompileTool)6 CompilerErrorException (org.eclipse.ceylon.compiler.CompilerErrorException)6 Test (org.junit.Test)6