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

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


    public void testAnnoSuppressesNothing() {
        assertErrors(new String[]{"SuppressesNothing.ceylon"},
                defaultOptions,
                null,
                new Kind[]{Kind.WARNING},
                new CompilerError(Kind.WARNING, "", 1, "suppresses no warnings"));
    }
View Full Code Here


        // We warn about warnings which are suppressed by an annotation on an outer declaration
        assertErrors(new String[]{"AlreadySuppressed.ceylon"},
                defaultOptions,
                null,
                new Kind[]{Kind.WARNING},
                new CompilerError(Kind.WARNING, "", 3, "warnings already suppressed by annotation"));
    }
View Full Code Here

        defaultOptions.add("unusedDeclaration");
        assertErrors(new String[]{"AlreadySuppressed.ceylon"},
                defaultOptions,
                null,
                new Kind[]{Kind.WARNING},
                new CompilerError(Kind.WARNING, "", 3, "warnings already suppressed by annotation"));
    }
View Full Code Here

    public void testUnknownWarningInAnno() {
        assertErrors(new String[]{"UnknownWarningInAnno.ceylon"},
                defaultOptions,
                null,
                new Kind[]{Kind.WARNING},
                new CompilerError(Kind.WARNING, "", 1, "unknown warning: blahblah"));
    }
View Full Code Here

    }

    @Test
    public void testBug407(){
        // make sure we don't get an NPE error
        assertErrors("bug04xx/Bug407", new CompilerError(25, "expression is not iterable: 'Set<Map<String,Integer>.Entry<String,Integer>>' is not a subtype of 'Iterable'"));
    }
View Full Code Here

    @Test
    public void testIopAmbiguousOverloading(){
        compile("JavaWithOverloadedMembers.java");
        assertErrors("AmbiguousOverloading",
                new CompilerError(25, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'ambiguousOverload' that accepts the given argument types 'String, String'"),
                new CompilerError(26, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'ambiguousOverload2' that accepts the given argument types 'Integer, Integer'")
                );
    }
View Full Code Here

   
    @Test
    public void testIopRefinesDefaultAccessMethodWithShared(){
        compile("access/JavaAccessModifiers.java");
        assertErrors("access/RefinesDefaultAccessMethodWithShared",
                new CompilerError(22, "non-actual member refines an inherited member: 'defaultAccessMethod' in 'JavaAccessModifiers'"));
    }
View Full Code Here

    @Test
    public void testIopRefinesDefaultAccessMethodWithActual(){
        compile("access/JavaAccessModifiers.java");
        assertErrors("access/RefinesDefaultAccessMethodWithActual",
                new CompilerError(22, "actual declaration must be shared: 'defaultAccessMethod'"));
    }
View Full Code Here

    @Test
    public void testIopExtendsDefaultAccessClassWithOverloading(){
        compile("access/JavaDefaultAccessClass4.java");
        assertErrors("access/ExtendsDefaultAccessClassWithOverloading",
                new CompilerError(21, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'JavaDefaultAccessClass4' that accepts the given argument types ''")
        );
    }
View Full Code Here

    @Test
    public void testIopExtendsDefaultAccessClassInAnotherPkg(){
        compile("access/JavaAccessModifiers.java");
        compile("access/JavaDefaultAccessClass3.java");
        assertErrors("ExtendsDefaultAccessClassInAnotherPkg",
                new CompilerError(21, "imported declaration is not shared: 'JavaDefaultAccessClass'"),
                new CompilerError(22, "imported declaration is not shared: 'JavaDefaultAccessClass2'"),
                new CompilerError(27, "supertype is not visible everywhere type 'ExtendsDefaultAccessClassInAnotherPkg' is visible: 'JavaDefaultAccessClass' involves an unshared type declaration"),
                new CompilerError(27, "type is not visible: 'JavaDefaultAccessClass'"),
                new CompilerError(29, "supertype is not visible everywhere type 'ExtendsDefaultAccessClassInAnotherPkg2' is visible: 'JavaDefaultAccessClass2' involves an unshared type declaration"),
                new CompilerError(29, "type is not visible: 'JavaDefaultAccessClass2'"),
                new CompilerError(31, "package private constructor is not visible: 'JavaDefaultAccessClass3'")
        );
    }
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.