use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class InteropTests method testIopCallsDefaultAccessClassWithOverloading.
@Test
public void testIopCallsDefaultAccessClassWithOverloading() {
compile("access/JavaDefaultAccessClass4.java");
assertErrors("access/CallsDefaultAccessClassWithOverloading", new CompilerError(22, "illegal argument types in invocation of overloaded method or class: there must be exactly one overloaded declaration of 'JavaDefaultAccessClass4' which accepts the given argument types ''"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class ModelLoaderTests method bogusModelAnnotationsTopLevelClass.
@Test
public void bogusModelAnnotationsTopLevelClass() {
compile("BogusTopLevelClass.java", "BogusTopLevelClass2.java");
assertErrors("bogusTopLevelClassUser", new CompilerError(-1, "Constructor for 'org.eclipse.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 org.eclipse.ceylon.compiler.java.test.model::BogusTopLevelClass: org.eclipse.ceylon.compiler.java.test.model::MissingType is not a type parameter"), new CompilerError(2, "Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n Error while resolving type of extended type for org.eclipse.ceylon.compiler.java.test.model::BogusTopLevelClass:\n Could not find type 'org.eclipse.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(3, "class cannot be instantiated: 'BogusTopLevelClass' does not have a default constructor"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class ModelLoaderTests method bogusModelAnnotationsTopLevelMethod.
@Test
public void bogusModelAnnotationsTopLevelMethod() {
compile("bogusTopLevelMethodNoMethod_.java", "bogusTopLevelMethodMissingType_.java", "bogusTopLevelMethodInvalidType_.java", "bogusTopLevelMethodNotStatic_.java");
assertErrors("bogusTopLevelMethodUser", new CompilerError(2, "Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodNoMethod: static method missing"), new CompilerError(2, "Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodNotStatic: method is not static"), new CompilerError(2, "Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving type of toplevel method for org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodMissingType:\n" + " Could not find type 'org.eclipse.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(2, "Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while parsing type of toplevel method for org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodInvalidType:\n" + " Expecting word but got AND"), new CompilerError(3, "could not determine type of function or value reference: the type of 'bogusTopLevelMethodNoMethod' is not known - Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodNoMethod: static method missing"), new CompilerError(4, "could not determine type of function or value reference: the type of 'bogusTopLevelMethodNotStatic' is not known - Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving toplevel method org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodNotStatic: method is not static"), new CompilerError(5, "could not determine type of function or value reference: the type of 'bogusTopLevelMethodMissingType' is not known - Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while resolving type of toplevel method for org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodMissingType:\n" + " Could not find type 'org.eclipse.ceylon.compiler.java.test.model.MissingType'"), new CompilerError(6, "could not determine type of function or value reference: the type of 'bogusTopLevelMethodInvalidType' is not known - Error while loading the org.eclipse.ceylon.compiler.java.test.model/1 module:\n" + " Error while parsing type of toplevel method for org.eclipse.ceylon.compiler.java.test.model::bogusTopLevelMethodInvalidType:\n" + " Expecting word but got AND"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
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'"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
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("org.eclipse.ceylon.compiler.java.test.issues.bug13xx.bug1347.test", new ModuleWithArtifact("org.eclipse.ceylon.compiler.java.test.issues.bug13xx.bug1347", "1"), new ModuleWithArtifact("com.ceylon.java8", "1", "test/java8/modules", "jar"));
}
Aggregations