use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceMissingOverride_5.
@Test
public void testInterfaceMissingOverride_5() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo { def boolean equals(Object x) }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, MISSING_OVERRIDE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceOverrideReturnType_3.
@Test
public void testInterfaceOverrideReturnType_3() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.GenericSuperTypeInterface<Comparable<String>> { " + "override String getTypeParamValue() " + "}");
helper.assertNoErrors(xtendInterface);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceObsoleteOverride_0.
@Test
public void testInterfaceObsoleteOverride_0() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo { override bar() }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, OBSOLETE_OVERRIDE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testDuplicateInterfaceMethod_1.
@Test
public void testDuplicateInterfaceMethod_1() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo { def void bar(String x) def void bar(int x) }");
helper.assertNoError(xtendInterface, DUPLICATE_METHOD);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testOverrideGenericInterfaceMethod_3.
@Test
public void testOverrideGenericInterfaceMethod_3() throws Exception {
XtendInterface xtendInterface = interfaze(" import java.util.List interface Foo<T> extends test.GenericSuperTypeInterface<T> { " + "override <T3> getValue3(List<T3> t) " + "}");
helper.assertNoErrors(xtendInterface);
}
Aggregations