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

Unified Diff: pkg/analysis_server/test/search/member_declarations_test.dart

Issue 398093003: Fix for name declaration indexing in for-in statement. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | « no previous file | pkg/analysis_services/lib/src/index/index_contributor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/search/member_declarations_test.dart
diff --git a/pkg/analysis_server/test/search/member_declarations_test.dart b/pkg/analysis_server/test/search/member_declarations_test.dart
index cb4af305351a670a5df53f9f5a01facbcaea4572..bad6bc54179eafb1749b007c59b7f78d426018a3 100644
--- a/pkg/analysis_server/test/search/member_declarations_test.dart
+++ b/pkg/analysis_server/test/search/member_declarations_test.dart
@@ -62,6 +62,33 @@ class MemberDeclarationsTest extends AbstractSearchDomainTest {
return null;
}
+ test_localVariable() {
+ addTestFile('''
+class A {
+ main() {
+ var foo = 42;
+ }
+}
+''');
+ return findMemberDeclarations('foo').then((_) {
+ expect(results, isEmpty);
+ });
+ }
+
+ test_localVariable_forIn() {
+ addTestFile('''
+class A {
+ main() {
+ for (int foo in []) {
+ }
+ }
+}
+''');
+ return findMemberDeclarations('foo').then((_) {
+ expect(results, isEmpty);
+ });
+ }
+
test_methodField() {
addTestFile('''
class A {
« no previous file with comments | « no previous file | pkg/analysis_services/lib/src/index/index_contributor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698