Index: pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart |
diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart |
index 15b37b29dc1222f2b9e75f5372ccfc2b725c3040..2d9156a4375fff35d5717458b886b9929d690dcb 100644 |
--- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart |
+++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart |
@@ -4620,7 +4620,7 @@ void main() {h^}'''); |
} |
test_ArgDefaults_function_with_optional_positional() async { |
- _addMetaPackageSource(); |
+ addMetaPackageSource(); |
addTestSource(''' |
import 'package:meta/meta.dart'; |
@@ -4633,7 +4633,7 @@ void main() {h^}'''); |
} |
test_ArgDefaults_function_with_required_named() async { |
- _addMetaPackageSource(); |
+ addMetaPackageSource(); |
addTestSource(''' |
import 'package:meta/meta.dart'; |
@@ -4646,19 +4646,21 @@ void main() {h^}'''); |
defaultArgListString: 'bar, baz: null'); |
} |
- void _addMetaPackageSource() { |
- addPackageSource( |
- 'meta', |
- 'meta.dart', |
- r''' |
-library meta; |
+ test_ArgDefaults_method_with_required_named() async { |
+ addMetaPackageSource(); |
+ addTestSource(''' |
+import 'package:meta/meta.dart'; |
-const Required required = const Required(); |
+class A { |
+ bool foo(int bar, {bool boo, @required int baz}) => false; |
+ baz() { |
+ f^ |
+ } |
+}'''); |
+ await computeSuggestions(); |
-class Required { |
- final String reason; |
- const Required([this.reason]); |
-} |
-'''); |
+ assertSuggestMethod('foo', 'A', 'bool', |
+ relevance: DART_RELEVANCE_LOCAL_METHOD, |
+ defaultArgListString: 'bar, baz: null'); |
} |
} |