use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class IssuesTests_1000_1499 method testBug1347.
@Test
public void testBug1347() {
Assume.assumeTrue("Runs on JDK8", JDKUtils.jdk == JDKUtils.JDK.JDK8);
assertErrors("bug13xx/bug1347/bug1347", Arrays.asList("-out", destDir, "-rep", "test/java8/modules"), null, new CompilerError(12, "call to a static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(14, "call to a static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(16, "call to a static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(28, "call to a static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(30, "call to a static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"));
ErrorCollector c = new ErrorCollector();
assertCompilesOk(c, getCompilerTask(Arrays.asList("-target", "8", "-out", destDir, "-rep", "test/java8/modules"), c, "bug13xx/bug1347/bug1347.ceylon").call2());
run("com.redhat.ceylon.compiler.java.test.issues.bug13xx.bug1347.test", new ModuleWithArtifact("com.redhat.ceylon.compiler.java.test.issues.bug13xx.bug1347", "1"), new ModuleWithArtifact("com.ceylon.java8", "1", "test/java8/modules", "jar"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class IssuesTests_1000_1499 method testBug1185.
@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"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class ModelLoaderTests method bogusModelAnnotationsTopLevelAttribute.
@Test
public void bogusModelAnnotationsTopLevelAttribute() {
compile("bogusTopLevelAttributeNoGetter_.java", "bogusTopLevelAttributeMissingType_.java", "bogusTopLevelAttributeInvalidType_.java");
assertErrors("bogusTopLevelAttributeUser", new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel attribute com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeNoGetter: getter method missing"), new CompilerError(-1, "Error while resolving type of toplevel attribute for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeMissingType: Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(-1, "Error while parsing type of toplevel attribute for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeInvalidType: Expecting word but got AND"), new CompilerError(3, "could not determine type of function or value reference: 'bogusTopLevelAttributeNoGetter': Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel attribute com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeNoGetter: getter method missing"), new CompilerError(4, "could not determine type of function or value reference: 'bogusTopLevelAttributeMissingType': Error while resolving type of toplevel attribute for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeMissingType: Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(5, "could not determine type of function or value reference: 'bogusTopLevelAttributeInvalidType': Error while parsing type of toplevel attribute for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelAttributeInvalidType: Expecting word but got AND"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class ModelLoaderTests method bogusModelAnnotationsTopLevelClass.
@Test
public void bogusModelAnnotationsTopLevelClass() {
compile("BogusTopLevelClass.java", "BogusTopLevelClass2.java");
assertErrors("bogusTopLevelClassUser", new CompilerError(-1, "Constructor for 'com.redhat.ceylon.compiler.java.test.model.BogusTopLevelClass' should take 1 reified type arguments (TypeDescriptor) but has '0': skipping constructor."), new CompilerError(-1, "Invalid type signature for self type of com.redhat.ceylon.compiler.java.test.model::BogusTopLevelClass: com.redhat.ceylon.compiler.java.test.model::MissingType is not a type parameter"), new CompilerError(2, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n Error while resolving type of extended type for com.redhat.ceylon.compiler.java.test.model::BogusTopLevelClass:\n Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(3, "class cannot be instantiated: 'BogusTopLevelClass' does not have a default constructor"));
}
use of com.redhat.ceylon.compiler.java.test.CompilerError in project ceylon-compiler by ceylon.
the class ModelLoaderTests method loadVariadic.
@Test
public void loadVariadic() {
compile("Variadic.ceylon");
assertErrors("variadictest", new CompilerError(7, "missing argument to required parameter 'String+ seq' of 'VariadicPlus'"));
}
Aggregations