use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method thirdArgExactMatch.
@Test
public void thirdArgExactMatch() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo(1, 2, 3)");
final String testMe = _builder.toString();
final Procedure1<SignatureHelpConfiguration> _function = (SignatureHelpConfiguration it) -> {
it.setModel(this.getModel(testMe));
it.setLine(SignatureHelpTest.LINE_NUMBER);
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("foo(1, 2, 3");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("C.foo(a: A, b: B, c: C): void | c: C");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method multipleArgsWithLeadingWhitespaceAtComma_ExpectFirstArg.
@Test
public void multipleArgsWithLeadingWhitespaceAtComma_ExpectFirstArg() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo( 1 , 2)");
final String testMe = _builder.toString();
final Procedure1<SignatureHelpConfiguration> _function = (SignatureHelpConfiguration it) -> {
it.setModel(this.getModel(testMe));
it.setLine(SignatureHelpTest.LINE_NUMBER);
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("foo( 1 ,");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("B.foo(a: A, b: B): int | C.foo(a: A, b: B, c: C): void | b: B");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method singleArgsExactMatchAfterTriggerChar.
@Test
public void singleArgsExactMatchAfterTriggerChar() {
final Procedure1<SignatureHelpConfiguration> _function = (SignatureHelpConfiguration it) -> {
StringConcatenation _builder = new StringConcatenation();
_builder.append("type A { op foo(a: A) { } } type Main { op main() { foo() } }");
it.setModel(_builder.toString());
it.setLine(0);
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("type A { op foo(a: A) { } } type Main { op main() { foo(");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("A.foo(a: A): void | a: A");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method secondArgExactMatch.
@Test
public void secondArgExactMatch() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo(1, 2)");
final String testMe = _builder.toString();
final Procedure1<SignatureHelpConfiguration> _function = (SignatureHelpConfiguration it) -> {
it.setModel(this.getModel(testMe));
it.setLine(SignatureHelpTest.LINE_NUMBER);
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("foo(1, 2");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("B.foo(a: A, b: B): int | C.foo(a: A, b: B, c: C): void | b: B");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method multipleArgsAtComma.
@Test
public void multipleArgsAtComma() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo(1, 2, 3)");
final String testMe = _builder.toString();
final Procedure1<SignatureHelpConfiguration> _function = (SignatureHelpConfiguration it) -> {
it.setModel(this.getModel(testMe));
it.setLine(SignatureHelpTest.LINE_NUMBER);
StringConcatenation _builder_1 = new StringConcatenation();
_builder_1.append("foo(1, 2,");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("C.foo(a: A, b: B, c: C): void | c: C");
};
this.testSignatureHelp(_function);
}
Aggregations