Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Unified Diff: pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart

Issue 2728653004: Default arg support continued (flutter-intellij#553). (Closed)
Patch Set: Review tweaks. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
index 7c91fe8324b281ba6f6125187905908ee9cf5663..94a5c564da57c8d42831fa4ec30054b7f3a3d328 100644
--- a/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/imported_reference_contributor_test.dart
@@ -4521,4 +4521,27 @@ class ImportedReferenceContributorTest_Driver
test_enum_deprecated() {
// TODO(scheglov) remove it?
}
+
+ /// Sanity check. Permutations tested in local_ref_contributor.
+ test_ArgDefaults_function_with_required_named() async {
+ addMetaPackageSource();
+
+ resolveSource(
+ '/testB.dart',
+ '''
+lib B;
+import 'package:meta/meta.dart';
+
+bool foo(int bar, {bool boo, @required int baz}) => false;
+''');
+
+ addTestSource('''
+import "/testB.dart";
+
+void main() {f^}''');
+ await computeSuggestions();
+
+ assertSuggestFunction('foo', 'bool',
+ defaultArgListString: 'bar, baz: null');
+ }
}

Powered by Google App Engine
This is Rietveld 408576698