Package com.redhat.ceylon.compiler

Examples of com.redhat.ceylon.compiler.CeylonCompileTool


   
    @Test
    public void testCompileWithOomeException()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                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());
        }
    }
View Full Code Here


   
    @Test
    public void testCompileWithStackOverflowError()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                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());
        }
    }
View Full Code Here

    @Test
    public void testBug1179()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        try{
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--src=test/src", "3"));
            Assert.fail("Tool should have thrown an exception");
        }catch(OptionArgumentException x){
            Assert.assertEquals("Invalid module name or source file: 3\n"
                                +"Module names should not contain any version part.\n"
View Full Code Here

    @Test
    public void testValidatingJavaOptions()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        try{
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--javac=-target=foo", "com.example"));
            Assert.fail("Tool should have thrown an exception");
        }catch(OptionArgumentException x){
            Assert.assertEquals("Invalid --javac option: -target: invalid target release: foo", x.getMessage());
        }
       
        try{
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--javac=-source=foo", "com.example"));
            Assert.fail("Tool should have thrown an exception");
        }catch(OptionArgumentException x){
            Assert.assertEquals("Invalid --javac option: -source: invalid source release: foo", x.getMessage());
        }
       
        try{
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--javac=-monkey", "com.example"));
            Assert.fail("Tool should have thrown an exception");
        }catch(OptionArgumentException x){
            Assert.assertEquals("Unknown --javac option: -monkey", x.getMessage());
        }
       
        {
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--javac=-Xlint:cast",
                            "--src=test/src", "com.redhat.ceylon.tools.test.ceylon"));
        }
       
        try{
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--javac=-Xlint:monkey",
                            "--src=test/src", "com.redhat.ceylon.tools.test.ceylon"));
            Assert.fail("Tool should have thrown an exception");
        }catch(OptionArgumentException x){
            Assert.assertEquals("Unknown --javac option: -Xlint:monkey", x.getMessage());
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.CeylonCompileTool

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.