use of org.eclipse.xtend.core.xtend.XtendFile in project xtext-xtend by eclipse.
the class ValidationBug464563Test method testJvmOperation_05.
@Test
public void testJvmOperation_05() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage");
_builder.newLine();
_builder.newLine();
_builder.append("import java.util.List");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void foo(List<Unknown[]> arg0) {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void bar() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("foo(notify)");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
final XtendFile file = this._parseHelper.parse(_builder);
this._validationTestHelper.assertError(file, XbasePackage.Literals.XFEATURE_CALL, IssueCodes.REFER_INVALID_TYPES, "The method foo(List<Unknown[]>) from the type Foo refers to the missing type Unknown");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtend.core.xtend.XtendFile in project xtext-xtend by eclipse.
the class ValidationBug464563Test method testJvmOperation_04.
@Test
public void testJvmOperation_04() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage");
_builder.newLine();
_builder.newLine();
_builder.append("import java.util.List");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def Object foo(Object arg0, List<Object> arg1) throws Unknown4 {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void bar() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("foo(null, null) ");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
final XtendFile file = this._parseHelper.parse(_builder);
this._validationTestHelper.assertError(file, XbasePackage.Literals.XFEATURE_CALL, IssueCodes.REFER_INVALID_TYPES, "The method foo(Object, List<Object>) from the type Foo refers to the missing type Unknown4");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtend.core.xtend.XtendFile in project xtext-xtend by eclipse.
the class ValidationBug464563Test method testJvmConstructor_04.
@Test
public void testJvmConstructor_04() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage");
_builder.newLine();
_builder.newLine();
_builder.append("import java.util.List");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("new (List<Unknown[]> arg0) {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void bar() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("new Foo(notify)");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
final XtendFile file = this._parseHelper.parse(_builder);
this._validationTestHelper.assertError(file, XbasePackage.Literals.XCONSTRUCTOR_CALL, IssueCodes.REFER_INVALID_TYPES, "The constructor Foo(List<Unknown[]>) refers to the missing type Unknown");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtend.core.xtend.XtendFile in project xtext-xtend by eclipse.
the class ValidationBug464563Test method testJvmConstructor_02.
@Test
public void testJvmConstructor_02() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage");
_builder.newLine();
_builder.newLine();
_builder.append("import java.util.List");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("new (Object arg0, List<Unknown2> arg1) throws Unknown3 {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void bar() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("new Foo(null, null) ");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
final XtendFile file = this._parseHelper.parse(_builder);
this._validationTestHelper.assertError(file, XbasePackage.Literals.XCONSTRUCTOR_CALL, IssueCodes.REFER_INVALID_TYPES, "The constructor Foo(Object, List<Unknown2>) refers to the missing type Unknown2");
this._validationTestHelper.assertNoErrors(file, XbasePackage.Literals.XCONSTRUCTOR_CALL, IssueCodes.REFER_INVALID_TYPES, "The constructor Foo(Object, List<Unknown2>) refers to the missing type Unknown3");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
use of org.eclipse.xtend.core.xtend.XtendFile in project xtext-xtend by eclipse.
the class ValidationBug464563Test method testJvmConstructor_07.
@Test
public void testJvmConstructor_07() {
try {
StringConcatenation _builder = new StringConcatenation();
_builder.append("package mypackage");
_builder.newLine();
_builder.newLine();
_builder.append("import java.util.List");
_builder.newLine();
_builder.newLine();
_builder.append("class Foo {");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("new <T extends Unknown & Unknown2> (List<T> arg0) {");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("\t");
_builder.append("def void bar() {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("new Foo(notify)");
_builder.newLine();
_builder.append("\t");
_builder.append("}");
_builder.newLine();
_builder.newLine();
_builder.append("}");
_builder.newLine();
final XtendFile file = this._parseHelper.parse(_builder);
this._validationTestHelper.assertError(file, XbasePackage.Literals.XCONSTRUCTOR_CALL, IssueCodes.REFER_INVALID_TYPES, "The constructor Foo(List<T>) refers to the missing type Unknown");
} catch (Throwable _e) {
throw Exceptions.sneakyThrow(_e);
}
}
Aggregations