Package com.redhat.ceylon.compiler.java.test

Examples of com.redhat.ceylon.compiler.java.test.CompilerError


        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"));
       
        File carFile = getModuleArchive("default", null);
        assertTrue(carFile.exists());

        JarFile car = new JarFile(carFile);
View Full Code Here


        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"),
                new CompilerError(20, "incorrect syntax: mismatched token 'ERROR' expecting initial-lowercase identifier"),
                new CompilerError(20, "incorrect syntax: no viable alternative at token '\"1.0.0\"'"),
                new CompilerError(20, "incorrect syntax: no viable alternative at token 'okmodule'")
        // this one is gone for some reason
//                new CompilerError(21, "incorrect syntax: no viable alternative at token '}'")
        );
       
        File carFile = getModuleArchive("default", null);
View Full Code Here

        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)"),
                new CompilerError(1, "source code imports two different versions of module 'ceylon.file': version \"0.5\" and version \"1.1.0\""),
                new CompilerError(2, "cannot find module artifact fooxhilio.bastardo-77.9(.car|.jar)\n"
                +"  \t- dependency tree: unknownmodule/1.0.0 -> fooxhilio.bastardo/77.9"),
                new CompilerError(4, "function or value does not exist: 'nanoTime'"),
                new CompilerError(4, "type does not exist: 'Test'"),
                new CompilerError(4, "unsupported module name: this namespace is used by Java platform modules"),
                new CompilerError(5, "duplicate declaration name: 'run'"),
                new CompilerError(7, "duplicate declaration name: 'run'"),
                new CompilerError(10, "case must be a toplevel anonymous class: 'alive' is not toplevel"),
                new CompilerError(10, "case must be a toplevel anonymous class: 'dead' is not toplevel"),
                new CompilerError(10, "case must be a toplevel anonymous class: 'moribund' is not toplevel"),
                new CompilerError(10, "case must be a toplevel anonymous class: 'resurrected' is not toplevel"),
                new CompilerError(12, "imported declaration not found: 'newServer_bogus'"),
                new CompilerError(30, "function or value does not exist: 'newServer_bogus'"),
                new CompilerError(30, "named arguments not supported for indirect invocations"),
                new CompilerError(135, "function or value does not exist: 'array'"),
                new CompilerError(135, "named arguments not supported for indirect invocations"),
                new CompilerError(138, "could not determine type of function or value reference: 'cells'"),
                new CompilerError(139, "could not determine type of function or value reference: 'c'"),
                new CompilerError(140, "could not determine type of function or value reference: 'c'")
        );
       
        File carFile = getModuleArchive("default", null);
        assertTrue(carFile.exists());
View Full Code Here

        Boolean ret = task.call();
        assertFalse(ret);

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

    }

    @Test
    public void testBug1576() {
        assertErrors("bug15xx/Bug1576",
                new CompilerError(21, "native declaration not found"),
                new CompilerError(26, "native declaration not found"),
                new CompilerError(29, "native declaration not found"),
                new CompilerError(32, "native declaration not found"),
                new CompilerError(36, "native declaration not found"),
                new CompilerError(40, "native declaration not found"),
                new CompilerError(45, "native declaration not found"),
                new CompilerError(50, "native declaration not found"),
                new CompilerError(55, "native declaration not found")
                );
    }
View Full Code Here

    public void testBug1580() {
        assertErrors(
                new String[] { "bug15xx/bug1580/Bug1580.ceylon", "bug15xx/bug1580/module.ceylon" },
                defaultOptions,
                null,
                new CompilerError(24, "could not determine type of method or attribute reference: 'instance' of 'NioXnioProvider'"));
    }
View Full Code Here

    public void testBug1581() {
        assertErrors(
                new String[] { "bug15xx/bug1581/Bug1581Java.java", "bug15xx/bug1581/Bug1581.ceylon", "bug15xx/bug1581/module.ceylon" },
                defaultOptions,
                null,
                new CompilerError(22, "package not found in imported modules: java.util (add module import to module descriptor of com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1581)"),
                new CompilerError(25, "cannot find symbol\n  symbol:   class Properties\n  location: class com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1581.Bug1581Java"),
                new CompilerError(27, "cannot find symbol\n  symbol:   class Properties\n  location: class com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1581.Bug1581Java"),
                new CompilerError(29, "cannot find symbol\n  symbol:   class Properties\n  location: class com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1581.Bug1581Java"),
                new CompilerError(32, "cannot find symbol\n  symbol:   class Properties\n  location: class com.redhat.ceylon.compiler.java.test.issues.bug15xx.bug1581.Bug1581Java"),
                new CompilerError(22, "parameter type could not be determined: 'props' of 'Bug1581Java'"),
                new CompilerError(23, "could not determine type of method or attribute reference: 'props' of 'Bug1581Java'"));
    }
View Full Code Here

    }
   
    @Test
    public void testBug1639() {
        assertErrors("bug16xx/Bug1639",
                new CompilerError(22, "dynamic is not yet supported on this platform"),
                new CompilerError(23, "dynamic is not yet supported on this platform"));
    }
View Full Code Here

    }

    @Test
    public void testBug1648() {
        assertErrors("bug16xx/Bug1648",
                new CompilerError(22, "dynamic is not yet supported on this platform"));
    }
View Full Code Here

    }

    @Test
    public void testBug1664() {
        assertErrors("bug16xx/Bug1664",
                new CompilerError(30, "refined member type parameter NewUnitType of 'convertTo' in 'Bug1664UnitOfTime' with upper bound which member type parameter NewUnitType does not satisfy not yet supported: 'UnitType'"),
                new CompilerError(37, "refined member type parameter NewUnitType of 'convertTo' in 'Bug1664UnitOfTime' with upper bound which member type parameter NewUnitType does not satisfy not yet supported: 'UnitType'"),
                new CompilerError(-1, "com.redhat.ceylon.compiler.java.test.issues.bug16xx.Bug1664Milliseconds is not abstract and does not override abstract method <NewUnitType>convertTo(com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor) in com.redhat.ceylon.compiler.java.test.issues.bug16xx.Bug1664UnitOfTime"),
                new CompilerError(44, "method convertTo in class com.redhat.ceylon.compiler.java.test.issues.bug16xx.Bug1664UnitOfTime<UnitType> cannot be applied to given types;\n"
                        +"  required: com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor\n"
                        +"  found: com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor\n"
                        +"  reason: explicit type argument com.redhat.ceylon.compiler.java.test.issues.bug16xx.Bug1664Seconds does not conform to declared bound(s) com.redhat.ceylon.compiler.java.test.issues.bug16xx.Bug1664Milliseconds"));
    }
View Full Code Here

TOP

Related Classes of com.redhat.ceylon.compiler.java.test.CompilerError

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.