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

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

Issue 1417603002: Fix for suggesting methods as a *name* of a local variable declaration. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/completion/optype_test.dart
diff --git a/pkg/analysis_server/test/services/completion/optype_test.dart b/pkg/analysis_server/test/services/completion/optype_test.dart
index 7f203095bff9f14a292c43f8e4b2334b400e9639..94b5dafe2c1cc204d83cb2a7038d7ac0f2e8f566 100644
--- a/pkg/analysis_server/test/services/completion/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/optype_test.dart
@@ -1160,15 +1160,15 @@ class C2 {
assertOpType(typeNames: false);
}
- test_SimpleFormalParameter_type_optionalPositional() {
+ test_SimpleFormalParameter_type_optionalNamed() {
// SimpleIdentifier DefaultFormalParameter FormalParameterList
- addTestSource('m([Str^]) {}');
+ addTestSource('m({Str^}) {}');
assertOpType(typeNames: true);
}
- test_SimpleFormalParameter_type_optionalNamed() {
+ test_SimpleFormalParameter_type_optionalPositional() {
// SimpleIdentifier DefaultFormalParameter FormalParameterList
- addTestSource('m({Str^}) {}');
+ addTestSource('m([Str^]) {}');
assertOpType(typeNames: true);
}
@@ -1368,6 +1368,20 @@ class C2 {
assertOpType();
}
+ test_VariableDeclaration_name_hasSome_parameterizedType() {
+ // SimpleIdentifier VariableDeclaration VariableDeclarationList
+ // VariableDeclarationStatement Block
+ addTestSource('main() {List<int> m^}');
+ assertOpType();
+ }
+
+ test_VariableDeclaration_name_hasSome_simpleType() {
+ // SimpleIdentifier VariableDeclaration VariableDeclarationList
+ // VariableDeclarationStatement Block
+ addTestSource('main() {String m^}');
+ assertOpType();
+ }
+
test_VariableDeclarationList_final() {
// VariableDeclarationList VariableDeclarationStatement Block
addTestSource('main() {final ^}');
« no previous file with comments | « pkg/analysis_server/test/services/completion/completion_test_util.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698