use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method firstArgExactMatch.
@Test
public void firstArgExactMatch() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo(1)");
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("A.foo(a: A): string | B.foo(a: A, b: B): int | C.foo(a: A, b: B, c: C): void | a: A");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method singleArgWithLeadingWhitespace.
@Test
public void singleArgWithLeadingWhitespace() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo( 1)");
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("A.foo(a: A): string | B.foo(a: A, b: B): int | C.foo(a: A, b: B, c: C): void | a: A");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method multipleArgsWithCommentAtCommaIncomplete.
@Test
public void multipleArgsWithCommentAtCommaIncomplete() {
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("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 multipleArgsWithLeadingWhitespaceBeforeComma_ExpectFirstArg.
@Test
public void multipleArgsWithLeadingWhitespaceBeforeComma_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 | a: A");
};
this.testSignatureHelp(_function);
}
use of org.eclipse.xtext.testing.SignatureHelpConfiguration in project xtext-core by eclipse.
the class SignatureHelpTest method noArgsExactMatch.
@Test
public void noArgsExactMatch() {
StringConcatenation _builder = new StringConcatenation();
_builder.append("foo()");
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(");
it.setColumn(_builder_1.length());
it.setExpectedSignatureHelp("A.foo(): void | A.foo(a: A): string | B.foo(a: A, b: B): int | C.foo(a: A, b: B, c: C): void | <empty>");
};
this.testSignatureHelp(_function);
}
Aggregations