use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceCompatibleThrowsClause_04.
@Test
public void testInterfaceCompatibleThrowsClause_04() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override throwable() throws RuntimeException }");
helper.assertNoError(xtendInterface.getMembers().get(0), INCOMPATIBLE_THROWS_CLAUSE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceIncompatibleThrowsClause_05.
@Test
public void testInterfaceIncompatibleThrowsClause_05() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override generifiedRuntimeException() throws java.io.FileNotFoundException }");
helper.assertError(xtendInterface.getMembers().get(0), XTEND_FUNCTION, INCOMPATIBLE_THROWS_CLAUSE, "Exception", "FileNotFoundException", "not", "compatible", "throws", "clause");
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class OverrideValidationTest method testInterfaceIncompatibleThrowsClause_01.
@Test
public void testInterfaceIncompatibleThrowsClause_01() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override runtimeException() 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 OverrideValidationTest method testInterfaceCompatibleThrowsClause_10.
@Test
public void testInterfaceCompatibleThrowsClause_10() throws Exception {
XtendInterface xtendInterface = interfaze("interface Foo extends test.ExceptionThrowingInterface { override <E extends java.io.IOException> generifiedIoException() throws E, NullPointerException, OutOfMemoryError }");
helper.assertNoError(xtendInterface.getMembers().get(0), INCOMPATIBLE_THROWS_CLAUSE);
}
use of org.eclipse.xtend.core.xtend.XtendInterface in project xtext-xtend by eclipse.
the class XtendValidationTest method testAbstractMethodWithoutReturnType_1.
@Test
public void testAbstractMethodWithoutReturnType_1() throws Exception {
XtendInterface clazz = interfaze("interface Foo { def test() }");
helper.assertError(clazz.getMembers().get(0), XTEND_FUNCTION, ABSTRACT_METHOD_MISSING_RETURN_TYPE);
}
Aggregations