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

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


    }

    @Test
    public void testBug1209() {
        assertErrors("bug1209",
                new CompilerError(3, "metamodel reference to local declaration")
        );
    }
View Full Code Here


    @Test
    public void testBinaryVersionIncompatible(){
        compile("JavaOldVersion.java");
        assertErrors("CeylonNewVersion",
                new CompilerError(-1, "Ceylon class com.redhat.ceylon.compiler.java.test.bc.JavaOldVersion was compiled by an incompatible version of the Ceylon compiler\n  The class was compiled using 0.0.\n  This compiler supports "+Versions.JVM_BINARY_MAJOR_VERSION+"."+Versions.JVM_BINARY_MINOR_VERSION+".\n  Please try to recompile your module using a compatible compiler.\n  Binary compatibility will only be supported after Ceylon 1.2."));
    }
View Full Code Here

        FileInputStream inputStream = new FileInputStream(javaClass);
        Util.copy(inputStream, outputStream);
        inputStream.close();
        outputStream.close();
       
        assertErrors("binaryVersion/module", new CompilerError(21, "This module was compiled for an incompatible version of the Ceylon compiler (0.0).\n"
                +"  This compiler supports "+Versions.JVM_BINARY_MAJOR_VERSION+"."+Versions.JVM_BINARY_MINOR_VERSION+".\n"
                +"  Please try to recompile your module using a compatible compiler.\n"
                +"  Binary compatibility will only be supported after Ceylon 1.2."));
    }
View Full Code Here

        FileInputStream inputStream = new FileInputStream(javaClass);
        Util.copy(inputStream, outputStream);
        inputStream.close();
        outputStream.close();
       
        assertErrors("binaryVersion2/module", new CompilerError(21, "This module was compiled for an incompatible version of the Ceylon compiler (0.0).\n"
                +"  This compiler supports "+Versions.JVM_BINARY_MAJOR_VERSION+"."+Versions.JVM_BINARY_MINOR_VERSION+".\n"
                +"  Please try to recompile your module using a compatible compiler.\n"
                +"  Binary compatibility will only be supported after Ceylon 1.2."));
    }
View Full Code Here

        compareWithJavaSource("bug07xx/Bug747");
    }

    @Test
    public void testBug751() {
        assertErrors("bug07xx/Bug751", new CompilerError(20, "package not found in imported modules: 'laknsd.askduyasjd' (add module import to module descriptor of 'com.redhat.ceylon.compiler.java.test.issues')"));
    }
View Full Code Here

    }

    @Test
    public void testBug950() {
        assertErrors("bug09xx/Bug950",
                new CompilerError(34, "member 'foo' is inherited ambiguously by 'Bug950_Bottom' from 'Bug950_Left' and another subtype of 'Bug950_Top' and so must be refined by 'Bug950_Bottom'"),
                new CompilerError(34, "may not inherit two declarations with the same name unless redefined in subclass: 'foo' is defined by supertypes 'Bug950_Left' and 'Bug950_Right'"));

    }
View Full Code Here

    }

    @Test
    public void testBug1083() {
        assertErrors("bug10xx/Bug1083",
                new CompilerError(24, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'BigInteger' that accepts the given argument types ''"));
    }
View Full Code Here

   
    @Test
    public void testBug1180() {
        compile("bug11xx/Bug1180_1.ceylon");
        assertErrors("bug11xx/Bug1180_2",
                new CompilerError(25, "ambiguous invocation of overloaded method or class: there must be exactly one overloaded declaration of 'ArrayList' that accepts the given argument types '{Bug1180Person*}'"),
                new CompilerError(25, "class alias may not alias overloaded class")
        );
    }
View Full Code Here

    @Test
    public void testBug1185() {
        compareWithJavaSource("bug11xx/Bug1185");
        run("com.redhat.ceylon.compiler.java.test.issues.bug11xx.bug1185");
        assertErrors("bug11xx/Bug1185_errors",
                new CompilerError(3, "literal outside representable range: 9223372036854775808 is too large to be represented as an Integer"),
                new CompilerError(4, "literal outside representable range: -9223372036854775809 is too large to be represented as an Integer"),
                new CompilerError(5, "invalid hexadecimal literal: #10000000000000000 has more than 64 bits"),
                new CompilerError(6, "invalid binary literal: $10000000000000000000000000000000000000000000000000000000000000000 has more than 64 bits")
        );
    }
View Full Code Here

    }
   
    @Test
    public void testBug1255() {
        assertErrors("bug12xx/Bug1255",
                new CompilerError(29, "spread argument is not iterable: '{String*}?' is not a subtype of 'Iterable'"),
                new CompilerError(29, "iterable element type could not be inferred")
                );
    }
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.