Package com.redhat.ceylon.compiler

Examples of com.redhat.ceylon.compiler.CeylonCompileTool


                            "--eclipse=false",
                            tmpDir.getAbsolutePath()));
            runTool(newTool);
            ToolModel<CeylonCompileTool> compileModel = pluginLoader.loadToolModel("compile");
            Assert.assertNotNull(compileModel);
            CeylonCompileTool compileTool = pluginFactory.bindArguments(compileModel,
                    args("--src=" + tmpDir.getAbsolutePath() + "/source",
                            "--out=" + tmpDir.getAbsolutePath(),
                            "org.example.hello"));
            runTool(compileTool);
        } finally {
View Full Code Here


   
    @Test
    public void testBug1183()  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.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

   
    @Test
    public void testBadIntegerLiteral()  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.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

    @Test
    public void testBug1623()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        try {
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--src=test/src/com/redhat/ceylon/tools/test/empty"));
            Assert.fail("Tool should have thrown an exception");
        } catch (ToolInitializationException e) {
            Assert.assertEquals("No modules or source files to compile", e.getMessage());
        }
View Full Code Here

    public void testUnknownWarning()  throws Exception {
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
       
        try {
            CeylonCompileTool tool = pluginFactory.bindArguments(model,
                    options("--suppress-warnings=blah"));
            Assert.fail("Tool should have thrown an exception");
        } catch (OptionArgumentException e) {
            // We expect this, not a FatalToolError
        }
View Full Code Here

   
    @Test
    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();
    }
View Full Code Here

        destDir.mkdirs();
        FileUtil.copyAll(new File("test/src/com/redhat/ceylon/tools/test/cwdtest"), destDir);
       
        ToolModel<CeylonCompileTool> model = pluginLoader.loadToolModel("compile");
        Assert.assertNotNull(model);
        CeylonCompileTool tool = pluginFactory.bindArguments(model,
                Arrays.asList(
                        "--cwd", destDir.getPath(),
                        "--src=src",
                        "--resource=res",
                        "--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

   
    @Test
    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();
    }
View Full Code Here

   
    @Test
    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();
    }
View Full Code Here

        carFile1.delete();
        File carFile2 = getModuleArchive("com.redhat.ceylon.tools.test.multiple.sûb2", "1.0");
        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());
    }
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.