use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class StaticTests method testStaticInterfaceMethods.
@Test
public void testStaticInterfaceMethods() {
assertErrors("klass/StaticInterfaceMethods", Arrays.asList("-target", "7", "-source", "7"), null, new CompilerError(23, "declaration of static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(25, "declaration of static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(29, "declaration of static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(31, "declaration of static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"), new CompilerError(34, "declaration of static interface member is not allowed unless you set the -target flag to 8: --javac=-target=8"));
compile(Arrays.asList("-target", "8", "-source", "8"), "klass/StaticInterfaceMethods.ceylon");
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class IssuesTests_1000_1499 method testBug1185.
@Test
public void testBug1185() {
compareWithJavaSource("bug11xx/Bug1185");
run("org.eclipse.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 org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class IssuesTests_1500_1999 method testBug1773.
@Test
public void testBug1773() {
ErrorCollector collector = new ErrorCollector();
CeyloncTaskImpl task = getCompilerTask(defaultOptions, collector, "bug17xx/Bug1773.ceylon");
// now compile it all the way
ExitState exitState = task.call2();
Assert.assertEquals(ExitState.CeylonState.ERROR, exitState.ceylonState);
// make sure we only got one, do not trust actualErrors.size() for that since it's a Set so
// two methods with same contents would count as one.
Assert.assertEquals(1, exitState.errorCount);
TreeSet<CompilerError> actualErrors = collector.get(Diagnostic.Kind.ERROR);
compareErrors(actualErrors, new CompilerError(22, "dynamic is not supported on the JVM"));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class IssuesTests_1500_1999 method testBug1882_JDK8.
@Test
public void testBug1882_JDK8() {
Assume.assumeTrue("Runs on JDK8", JDKUtils.jdk == JDKUtils.JDK.JDK8);
assertErrors("bug18xx/bug1882/module", new CompilerError(Kind.WARNING, "module.ceylon", 3, "You import JDK7, which is provided by the JDK8 you are running on, but we cannot check that you are not using any JDK8-specific classes or methods. Upgrade your import to JDK8 if you depend on JDK8 classes or methods."));
}
use of org.eclipse.ceylon.compiler.java.test.CompilerError in project ceylon by eclipse.
the class IssuesTests_6500_6999 method testBug6916.
@Test
public void testBug6916() throws Throwable {
assertErrors("bug69xx/bug6916/Bug6916", Arrays.asList("-flat-classpath"), null, new CompilerError(5, "Failed to determine if getConverter is overriding a super method: class file for org.apache.wicket.util.convert.IConverter not found"), new CompilerError(5, "formal member 'canCallListenerInterfaceAfterExpiry' of 'IRequestableComponent' not implemented for concrete class 'HelloWorld': 'HelloWorld' neither directly implements nor inherits a concrete implementation of 'canCallListenerInterfaceAfterExpiry'"), new CompilerError(5, "formal member 'equals' of 'Object' not implemented for concrete class 'HelloWorld': 'HelloWorld' neither directly implements nor inherits a concrete implementation of 'equals'"), new CompilerError(5, "formal member 'getBehaviorById' of 'IRequestableComponent' not implemented for concrete class 'HelloWorld': 'HelloWorld' neither directly implements nor inherits a concrete implementation of 'getBehaviorById'"), new CompilerError(5, "formal member 'getBehaviorId' of 'IRequestableComponent' not implemented for concrete class 'HelloWorld': 'HelloWorld' neither directly implements nor inherits a concrete implementation of 'getBehaviorId'"), new CompilerError(5, "formal member 'hash' of 'Object' not implemented for concrete class 'HelloWorld': 'HelloWorld' neither directly implements nor inherits a concrete implementation of 'hash'"));
compile(Arrays.asList("-fully-export-maven-dependencies"), "bug69xx/bug6916/Bug6916.ceylon");
}
Aggregations