use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug435043Test method test_17.
@Test
public void test_17() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.io.*");
_builder.newLine();
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append(" ");
_builder.append("static class C2 extends InputStream {");
_builder.newLine();
_builder.append("\t ");
_builder.append("val bytes = \"FooBar\".bytes.iterator");
_builder.newLine();
_builder.append("\t ");
_builder.append("override read() throws IOException {");
_builder.newLine();
_builder.append("\t ");
_builder.append("if(bytes.hasNext) bytes.next else -1");
_builder.newLine();
_builder.append("\t ");
_builder.append("}");
_builder.newLine();
_builder.append("\t ");
_builder.append("toS<|>");
_builder.newLine();
_builder.append("\t ");
_builder.append("val bytes = \"FooBar\".bytes.iterator");
_builder.newLine();
_builder.append(" ");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug435043Test method test_22.
@Test
public void test_22() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.io.*");
_builder.newLine();
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append(" ");
_builder.append("static class C2 extends InputStream {");
_builder.newLine();
_builder.append("\t ");
_builder.append("new() {}");
_builder.newLine();
_builder.append("\t ");
_builder.append("toS<|>");
_builder.newLine();
_builder.append("\t ");
_builder.append("override read() throws IOException {");
_builder.newLine();
_builder.append("\t ");
_builder.append("if(bytes.hasNext) bytes.next else -1");
_builder.newLine();
_builder.append("\t ");
_builder.append("}");
_builder.newLine();
_builder.append(" ");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug435043Test method test_07.
@Test
public void test_07() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.io.*");
_builder.newLine();
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append(" ");
_builder.append("static class C2 extends InputStream {");
_builder.newLine();
_builder.append("\t ");
_builder.append("val bytes = \"FooBar\".bytes.iterator");
_builder.newLine();
_builder.append("\t");
_builder.newLine();
_builder.append("\t ");
_builder.append("toS<|>");
_builder.newLine();
_builder.append("\t");
_builder.newLine();
_builder.append("\t ");
_builder.append("override read() throws IOException {");
_builder.newLine();
_builder.append("\t ");
_builder.append("if(bytes.hasNext) bytes.next else -1");
_builder.newLine();
_builder.append("\t ");
_builder.append("}");
_builder.newLine();
_builder.append(" ");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug435043Test method test_19.
@Test
public void test_19() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.io.*");
_builder.newLine();
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append(" ");
_builder.append("static class C2 extends InputStream {");
_builder.newLine();
_builder.append("\t ");
_builder.append("val bytes = new Object() {}");
_builder.newLine();
_builder.append("\t ");
_builder.append("<|>");
_builder.newLine();
_builder.append("\t ");
_builder.append("override read() throws IOException {");
_builder.newLine();
_builder.append("\t ");
_builder.append("if(bytes.hasNext) bytes.next else -1");
_builder.newLine();
_builder.append("\t ");
_builder.append("}");
_builder.newLine();
_builder.append(" ");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug435043Test method test_20.
@Test
public void test_20() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("import java.io.*");
_builder.newLine();
_builder.newLine();
_builder.append("class C {");
_builder.newLine();
_builder.append(" ");
_builder.append("static class C2 extends InputStream {");
_builder.newLine();
_builder.append("\t ");
_builder.append("val bytes = new Object() {}");
_builder.newLine();
_builder.append("\t ");
_builder.append("toS<|>");
_builder.newLine();
_builder.append("\t ");
_builder.append("override read() throws IOException {");
_builder.newLine();
_builder.append("\t ");
_builder.append("if(bytes.hasNext) bytes.next else -1");
_builder.newLine();
_builder.append("\t ");
_builder.append("}");
_builder.newLine();
_builder.append(" ");
_builder.append("}");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalDisplayedAtCursor("toString() - Override method from Object");
}
Aggregations