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

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

Issue 862803008: fix completion in for statement (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 5 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
« 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 87e4d672e79659d7ece5e167dbd61c701a48a2fe..ce7a5ba2fd725c2f934fff21ca18f26564c3dcb4 100644
--- a/pkg/analysis_server/test/services/completion/optype_test.dart
+++ b/pkg/analysis_server/test/services/completion/optype_test.dart
@@ -309,7 +309,6 @@ class OpTypeTest {
assertOpType(returnValue: true, typeNames: true);
}
-
test_ConditionalExpression_elseExpression_empty() {
// SimpleIdentifier ConditionalExpression ReturnStatement
addTestSource('class C {foo(){var f; {var x;} return a ? T1 : ^}}');
@@ -445,6 +444,42 @@ class OpTypeTest {
assertOpType(returnValue: true, typeNames: true, voidReturn: true);
}
+ test_ForEachStatement_iterable() {
+ // SimpleIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (int foo in ^) {}}');
+ assertOpType(returnValue: true, typeNames: true);
+ }
+
+ test_ForEachStatement_loopVariable() {
+ // SimpleIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (^ in args) {}}');
+ assertOpType(typeNames: true);
+ }
+
+ test_ForEachStatement_loopVariable_name() {
+ // DeclaredIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (String ^ in args) {}}');
+ assertOpType();
+ }
+
+ test_ForEachStatement_loopVariable_name2() {
+ // DeclaredIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (String f^ in args) {}}');
+ assertOpType();
+ }
+
+ test_ForEachStatement_loopVariable_type() {
+ // SimpleIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (^ foo in args) {}}');
+ assertOpType(typeNames: true);
+ }
+
+ test_ForEachStatement_loopVariable_type2() {
+ // DeclaredIdentifier ForEachStatement Block
+ addTestSource('main(args) {for (S^ foo in args) {}}');
+ assertOpType(typeNames: true);
+ }
+
test_FormalParameterList() {
// FormalParameterList MethodDeclaration
addTestSource('class A {a(^) { }}');
« 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