| Index: pkg/analysis_server/test/services/completion/completion_target_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/completion_target_test.dart b/pkg/analysis_server/test/services/completion/completion_target_test.dart
|
| index 569610cb219a389cc2efefe22474971a913bf8f2..f7cca21b8d96b746e60d1a52e2c137b1636da2d7 100644
|
| --- a/pkg/analysis_server/test/services/completion/completion_target_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/completion_target_test.dart
|
| @@ -61,6 +61,16 @@ class CompletionTargetTest extends AbstractContextTest {
|
| assertTarget(')', '()', argIndex: 0);
|
| }
|
|
|
| + test_ArgumentList_InstanceCreationExpression2() {
|
| + // ArgumentList InstanceCreationExpression Block
|
| + addTestSource('main() {new Foo(a,^)}');
|
| + if (context.analysisOptions.enableTrailingCommas) {
|
| + assertTarget(')', '(a)', argIndex: 1);
|
| + } else {
|
| + assertTarget('', '(a, )', argIndex: 1);
|
| + }
|
| + }
|
| +
|
| test_ArgumentList_InstanceCreationExpression_functionArg2() {
|
| // ArgumentList InstanceCreationExpression Block
|
| addTestSource('main() {new B(^)} class B{B(f()){}}');
|
| @@ -85,10 +95,20 @@ class CompletionTargetTest extends AbstractContextTest {
|
| assertTarget('n', '(n)', argIndex: 0);
|
| }
|
|
|
| + test_ArgumentList_MethodInvocation3a() {
|
| + // ArgumentList MethodInvocation Block
|
| + addTestSource('main() {foo((n)^)}');
|
| + assertTarget(')', '((n))', argIndex: 0);
|
| + }
|
| +
|
| test_ArgumentList_MethodInvocation4() {
|
| // ArgumentList MethodInvocation Block
|
| addTestSource('main() {foo(n,^)}');
|
| - assertTarget('', '(n, )', argIndex: 1);
|
| + if (context.analysisOptions.enableTrailingCommas) {
|
| + assertTarget(')', '(n)', argIndex: 1);
|
| + } else {
|
| + assertTarget('', '(n, )', argIndex: 1);
|
| + }
|
| }
|
|
|
| test_ArgumentList_MethodInvocation_functionArg() {
|
|
|