Package com.redhat.ceylon.compiler

Examples of com.redhat.ceylon.compiler.CeylonCompileTool.run()


        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.bug1183"));
        try {
            tool.run();
            Assert.fail("Tool should have thrown an exception");
        } catch (CompilerErrorException e) {
            // We expect this, not a FatalToolError
        }
       
View Full Code Here


        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.badintegerliteral"));
        try {
            tool.run();
            Assert.fail("Tool should have thrown an exception");
        } catch (CompilerErrorException e) {
            // We expect this, not a FatalToolError
        }
       
View Full Code Here

    public void testCompile()  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.ceylon"));
        tool.run();
    }
   
    @Test
    public void testCompileCwd()  throws Exception {
        File destDir = destFile("compilecwdtest");
View Full Code Here

                        "--out=mod",
                        "--rep", "aether",
                        "--maven-overrides", "overrides.xml",
                        "--javac=-cp=" + getClassPathAsPath(), // Unfortunately --cwd doesn't affect Java options
                        "cwdtest"));
        tool.run();
       
        File carFile = getModuleArchive("cwdtest", "1", (new File(destDir, "mod")).getPath());
        assertTrue(carFile.exists());
       
        JarFile car = new JarFile(carFile);
View Full Code Here

    public void testCompileVerbose()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--verbose", "--src=test/src", "com.redhat.ceylon.tools.test.ceylon"));
        tool.run();
    }
   
    @Test
    public void testCompileDefault()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
View Full Code Here

    public void testCompileDefault()  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/deflt", "default"));
        tool.run();
    }
   
    @Test
    public void testCompileMultiple()  throws Exception {
        File carFile1 = getModuleArchive("com.redhat.ceylon.tools.test.multiple.sub1", "1.0");
View Full Code Here

        carFile2.delete();
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.multiple.*"));
        tool.run();
        assertTrue(carFile1.exists() && carFile2.exists());
    }
   
    @Test
    public void testCompileNoSuchModule()  throws Exception {
View Full Code Here

        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.syntax"));
        try{
            tool.run();
            Assert.fail("Tool should have thrown an exception");
        }catch(CompilerErrorException x){
            Assert.assertEquals("There was 1 error", x.getMessage());
        }catch(Throwable t){
            t.printStackTrace();
View Full Code Here

        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.analysis"));
        try{
            tool.run();
            Assert.fail("Tool should have thrown an exception");
        }catch(CompilerErrorException x){
            Assert.assertEquals("There were 3 errors", x.getMessage());
        }catch(Throwable t){
            t.printStackTrace();
View Full Code Here

        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                options("--src=test/src", "com.redhat.ceylon.tools.test.erroneous"));
        try{
            tool.run();
            Assert.fail("Tool should have thrown an exception");
        }catch(CompilerErrorException x){
            Assert.assertEquals("There was 1 error", x.getMessage());
        }catch(Throwable t){
            t.printStackTrace();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.