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

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

Issue 2034713004: improve completions in closures and switch statements (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge Created 4 years, 6 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/dart/keyword_contributor_test.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/dart/optype_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/optype_test.dart b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
index 9a6982b63fa48dc5b571d294627c6e8ef0907d61..eeada57727ebe8d0deaacd4067682c9a6cd67c4a 100644
--- a/pkg/analysis_server/test/services/completion/dart/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/optype_test.dart
@@ -142,6 +142,16 @@ class OpTypeTest {
assertOpType(typeNames: true);
}
+ test_AsIdentifier() {
+ addTestSource('class A {var asdf; foo() {as^}');
+ assertOpType(returnValue: true, typeNames: true, voidReturn: true);
+ }
+
+ test_AsIdentifier2() {
+ addTestSource('class A {var asdf; foo() {A as^}');
+ assertOpType();
+ }
+
test_Assert() {
addTestSource('main() {assert(^)}');
assertOpType(returnValue: true, typeNames: true);
@@ -1359,6 +1369,11 @@ class C2 {
assertOpType(returnValue: true, typeNames: true, voidReturn: true);
}
+ test_SwitchStatement_body_end2() {
+ addTestSource('main() {switch(k) {case 1:as^}}');
+ assertOpType(returnValue: true, typeNames: true, voidReturn: true);
+ }
+
test_SwitchStatement_expression1() {
// SimpleIdentifier SwitchStatement Block
addTestSource('main() {switch(^k) {case 1:{}}}');
« no previous file with comments | « pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698