Examples of CeyloncTaskImpl


Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

        options.add("-src");
        options.add(srcPath);
        options.addAll(defaultOptions);
        options.add("-continue");
        ErrorCollector c = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(options,
                c,
                Arrays.asList("okmodule"),
                subPath + "/dupdeclerr1.ceylon",
                subPath + "/dupdeclerr2.ceylon",
                subPath + "/someok.ceylon");
        Boolean ret = task.call();
        assertFalse(ret);

        TreeSet<CompilerError> actualErrors = c.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors,
//                new CompilerError(21, "cannot find module artifact notfound-1(.car|.jar)\n  \t- dependency tree: okmodule/1.0.0 -> notfound/1"),
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

        options.add("-src");
        options.add(srcPath);
        options.addAll(defaultOptions);
        options.add("-continue");
        ErrorCollector c = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(options,
                c,
                Arrays.asList("okmodule"),
                subPath + "/someok.ceylon");
        Boolean ret = task.call();
        assertFalse(ret);

        TreeSet<CompilerError> actualErrors = c.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors,
                new CompilerError(21, "cannot find module artifact notfound-1(.car|.jar)\n  \t- dependency tree: okmodule/1.0.0 -> notfound/1"));
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

        options.add("-src");
        options.add(srcPath);
        options.addAll(defaultOptions);
        options.add("-continue");
        ErrorCollector c = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(options,
                c,
                Arrays.asList("okmodule"),
                subPath + "/someok.ceylon");
        Boolean ret = task.call();
        assertFalse(ret);

        TreeSet<CompilerError> actualErrors = c.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors,
                new CompilerError(-1, "incorrect syntax: no viable alternative at token end of file"),
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

        options.add("-src");
        options.add(srcPath);
        options.addAll(defaultOptions);
        options.add("-continue");
        ErrorCollector c = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(options,
                c,
                subPath + "/dupdecl.ceylon",
                subPath + "/moduletest1/module.ceylon",
                subPath + "/moduletest1/package.ceylon",
                subPath + "/moduletest1/helloworld.ceylon",
                subPath + "/hello/hello.ceylon",
                subPath + "/hello/module.ceylon",
                subPath + "/hello/package.ceylon",
                subPath + "/testtest/module.ceylon",
                subPath + "/testtest/test.ceylon",
                subPath + "/sub/mod/module.ceylon",
                subPath + "/sub/mod/run.ceylon",
                subPath + "/sub/mod/package.ceylon",
                subPath + "/unknownmodule/module.ceylon",
                subPath + "/unknownmodule/run.ceylon",
                subPath + "/unknownmodule/package.ceylon",
                subPath + "/interop/module.ceylon",
                subPath + "/interop/interop.ceylon",
                subPath + "/jsonly/jsonly.ceylon",
                subPath + "/jsonly/module.ceylon",
                subPath + "/jsonly/package.ceylon",
                subPath + "/modulep/module.ceylon",
                subPath + "/modulep/main.ceylon",
                subPath + "/browser/dom/main.ceylon",
                subPath + "/browser/dom/package.ceylon",
                subPath + "/browser/module.ceylon",
                subPath + "/browser/main.ceylon",
                subPath + "/browser/package.ceylon",
                subPath + "/test/InheritanceAndBoxingTest.ceylon",
                subPath + "/test/ExceptionTest.ceylon",
                subPath + "/test/Foo.ceylon",
                subPath + "/test/GameOfLife.ceylon",
                subPath + "/test/Bar.ceylon",
                subPath + "/test/encoding.ceylon",
                subPath + "/test/helloworld.ceylon",
                subPath + "/swing/module.ceylon",
                subPath + "/swing/run.ceylon",
                subPath + "/swing/package.ceylon",
                subPath + "/interoprev/module.ceylon",
                subPath + "/interoprev/run.ceylon",
                subPath + "/interoprev/package.ceylon",
                subPath + "/java/hello.ceylon",
                subPath + "/java/module.ceylon",
                subPath + "/java/package.ceylon",
                subPath + "/helloworld.ceylon",
                subPath + "/wrongversion/module.ceylon",
                subPath + "/wrongversion/run.ceylon",
                subPath + "/wrongversion/package.ceylon",
                subPath + "/importhello/module.ceylon",
                subPath + "/importhello/helloworld.ceylon",
                subPath + "/usingimport.ceylon",
                // These depend on the error recovery we plan for 1.1
//                subPath + "/javaa/bugJvm1290.ceylon",
//                subPath + "/javaa/module.ceylon",
//                subPath + "/javaa/run.ceylon"
                subPath + "/gavinprob/module.ceylon",
                subPath + "/gavinprob/main.ceylon",
                subPath + "/web_ide_script/module.ceylon",
                subPath + "/web_ide_script/hello_world.ceylon",
                subPath + "/timetest/module.ceylon",
                subPath + "/timetest/test.ceylon"
                );
        Boolean ret = task.call();
        assertFalse(ret);

        TreeSet<CompilerError> actualErrors = c.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors,
                new CompilerError(1, "package not found in imported modules: 'java.lang' (define a module and add module import to its module descriptor)"),
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

        options.add("-src");
        options.add(srcPath);
        options.addAll(defaultOptions);
        options.add("-continue");
        ErrorCollector c = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(options,
                c,
                subPath + "/someok.ceylon");
        Boolean ret = task.call();
        assertFalse(ret);

        TreeSet<CompilerError> actualErrors = c.get(Diagnostic.Kind.ERROR);
        compareErrors(actualErrors,
                new CompilerError(23, "type does not exist: 'ERROR'")
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

    @Test
    public void testBug1773() {
        ErrorCollector collector = new ErrorCollector();
       
        CeyloncTaskImpl task = getCompilerTask(defaultOptions, collector, "bug17xx/Bug1773.ceylon");

        // now compile it all the way
        ExitState exitState = task.call2();
        Assert.assertEquals(ExitState.CeylonState.ERROR, exitState.ceylonState);
       
        // make sure we only got one, do not trust actualErrors.size() for that since it's a Set so
        // two methods with same contents would count as one.
        Assert.assertEquals(1, exitState.errorCount);
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

    }
   
    @Test
    public void testBug1830() {
        ErrorCollector collector = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(defaultOptions, collector, "bug18xx/Bug1830.ceylon");
        ExitState call2 = task.call2();
        Assert.assertEquals(CeylonState.ERROR, call2.ceylonState);
        Assert.assertEquals(Main.EXIT_ERROR, call2.javacExitCode);
    }
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

    }
   
    @Test
    public void testBug1836() {
        ErrorCollector collector = new ErrorCollector();
        CeyloncTaskImpl task = getCompilerTask(defaultOptions, collector, "bug18xx/Bug1836.ceylon");
        ExitState call2 = task.call2();
        Assert.assertEquals(CeylonState.ERROR, call2.ceylonState);
        Assert.assertEquals(Main.EXIT_ERROR, call2.javacExitCode);
    }
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

    public void testMdlByName() throws IOException{
        List<String> options = new LinkedList<String>();
        options.add("-src");
        options.add(getPackagePath()+"/modules/byName");
        options.addAll(defaultOptions);
        CeyloncTaskImpl task = getCompilerTask(options,
                null,
                Arrays.asList("default", "mod"));
        Boolean ret = task.call();
        assertTrue(ret);

        File carFile = getModuleArchive("default", null);
        assertTrue(carFile.exists());
View Full Code Here

Examples of com.redhat.ceylon.compiler.java.tools.CeyloncTaskImpl

    public void testMdlEndsWithJava() throws IOException{
        List<String> options = new LinkedList<String>();
        options.add("-src");
        options.add(dir);
        options.addAll(defaultOptions);
        CeyloncTaskImpl task = getCompilerTask(options,
                null,
                Arrays.asList("com.redhat.ceylon.compiler.java.test.cmr.modules.java"));
        Boolean ret = task.call();
        assertTrue(ret);
    }
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.