use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug370955Test method test_04.
@Flaky
@Test
public void test_04() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void method(CharSequence c) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("if (true) {");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("method(c.toString)");
_builder.newLine();
_builder.append("\t\t");
_builder.append("}");
_builder.newLine();
_builder.append("\t");
_builder.append("}\t");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertTextAtCursorPosition("toString", "toString".length(), "!=", "!==", "+", "->", "<", "<=", "<=>", "==", "===", "=>", ">", ">=", "?:", "toString");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug370955Test method test_01.
@Flaky
@Test
public void test_01() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void method(CharSequence c) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("c.toString");
_builder.newLine();
_builder.append("\t");
_builder.append("}\t");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertTextAtCursorPosition("toString", "toString".length(), "!=", "!==", "+", "->", "<", "<=", "<=>", "==", "===", "=>", ">", ">=", "?:", "toString");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug370955Test method test_03.
@Flaky
@Test
public void test_03() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void method(CharSequence c) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("if (true)");
_builder.newLine();
_builder.append("\t\t\t");
_builder.append("method(c.toString)");
_builder.newLine();
_builder.append("\t");
_builder.append("}\t");
_builder.newLine();
_builder.append("}");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertTextAtCursorPosition("toString", "toString".length(), "!=", "!==", "+", "->", "<", "<=", "<=>", "==", "===", "=>", ">", ">=", "?:", "toString");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug402876Test method testExtensionPrecendence_02.
@Test
public void testExtensionPrecendence_02() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def void m(java.util.Collection<String> s) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("s.map<|>");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("map[]").withDisplayString("map((T)=>R transformation) : Iterable<R> - IterableExtensions");
}
use of org.eclipse.xtext.ui.testing.ContentAssistProcessorTestBuilder in project xtext-xtend by eclipse.
the class Bug402876Test method testExtensionPrecendence_05.
@Test
public void testExtensionPrecendence_05() throws Exception {
ContentAssistProcessorTestBuilder _newBuilder = this.newBuilder();
StringConcatenation _builder = new StringConcatenation();
_builder.append("class C {");
_builder.newLine();
_builder.append("\t");
_builder.append("def static <T, R> void map(java.util.Collection<T> c, (T)=>R f) {} ");
_builder.newLine();
_builder.append("\t");
_builder.append("def void m(java.util.List<String> s) {");
_builder.newLine();
_builder.append("\t\t");
_builder.append("s.map<|>");
_builder.newLine();
_newBuilder.append(_builder.toString()).assertProposalAtCursor("map[]").withDisplayString("map((T)=>R transformation) : List<R> - ListExtensions");
}
Aggregations