use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceIncompatibleThrowsClause.
@Test
public void testInterfaceIncompatibleThrowsClause() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override ioException() throws Exception }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, INCOMPATIBLE_THROWS_CLAUSE, "Exception", "not", "compatible", "throws", "clause");
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class XtendValidationTest method testInterfaceExtendsItself.
@Test
public void testInterfaceExtendsItself() throws Exception {
XtendInterface interfaze = interfaze("interface Foo extends Foo {}");
helper.assertError(interfaze, XTEND_INTERFACE, CYCLIC_INHERITANCE, "hierarchy", "cycles");
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class XtendValidationTest method testInterfaceExtendsInterface.
@Test
public void testInterfaceExtendsInterface() throws Exception {
XtendInterface interfaze = interfaze("interface Foo extends Cloneable {}");
helper.assertNoErrors(interfaze);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class XtendValidationTest method testAnnotationTarget_05.
@Test
public void testAnnotationTarget_05() throws Exception {
XtendInterface interfaze = interfaze("@testdata.Annotation2('foo') interface X { }");
helper.assertError(interfaze, XAnnotationsPackage.Literals.XANNOTATION, ANNOTATION_WRONG_TARGET, "@Annotation2");
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class XtendValidationTest method testConstructorInInterface.
@Test
public void testConstructorInInterface() throws Exception {
XtendInterface interfaze = interfaze("interface Foo { new() {} }");
helper.assertError(interfaze, XTEND_CONSTRUCTOR, CONSTRUCTOR_NOT_PERMITTED);
}
Aggregations