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

Side by Side Diff: pkg/analysis_server/test/services/index/dart_index_contributor_test.dart

Issue 709493002: Fix 'Unused local variable' hints in analyzer and analysis_server. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library test.services.src.index.dart_index_contributor; 5 library test.services.src.index.dart_index_contributor;
6 6
7 import 'package:analysis_server/src/services/index/index.dart'; 7 import 'package:analysis_server/src/services/index/index.dart';
8 import 'package:analysis_server/src/services/index/index_contributor.dart'; 8 import 'package:analysis_server/src/services/index/index_contributor.dart';
9 import 'package:analysis_server/src/services/index/index_store.dart'; 9 import 'package:analysis_server/src/services/index/index_store.dart';
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 void test_NameElement_isDefinedBy_localVariable_inForEach() { 125 void test_NameElement_isDefinedBy_localVariable_inForEach() {
126 _indexTestUnit(''' 126 _indexTestUnit('''
127 class A { 127 class A {
128 main() { 128 main() {
129 for (int test in []) { 129 for (int test in []) {
130 } 130 }
131 } 131 }
132 } 132 }
133 '''); 133 ''');
134 // prepare elements 134 // prepare elements
135 Element mainElement = findElement('main');
136 LocalVariableElement testElement = findElement('test'); 135 LocalVariableElement testElement = findElement('test');
137 Element nameElement = new NameElement('test'); 136 Element nameElement = new NameElement('test');
138 // verify 137 // verify
139 _assertRecordedRelation( 138 _assertRecordedRelation(
140 nameElement, 139 nameElement,
141 IndexConstants.NAME_IS_DEFINED_BY, 140 IndexConstants.NAME_IS_DEFINED_BY,
142 _expectedLocation(testElement, 'test in []')); 141 _expectedLocation(testElement, 'test in []'));
143 } 142 }
144 143
145 void test_NameElement_method() { 144 void test_NameElement_method() {
(...skipping 1609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1755 1754
1756 RecordedRelation(this.element, this.relationship, this.location); 1755 RecordedRelation(this.element, this.relationship, this.location);
1757 1756
1758 @override 1757 @override
1759 String toString() { 1758 String toString() {
1760 return 'RecordedRelation(element=$element; relationship=$relationship; ' 1759 return 'RecordedRelation(element=$element; relationship=$relationship; '
1761 'location=$location; flags=' '${location.isQualified ? "Q" : ""}' 1760 'location=$location; flags=' '${location.isQualified ? "Q" : ""}'
1762 '${location.isResolved ? "R" : ""})'; 1761 '${location.isResolved ? "R" : ""})';
1763 } 1762 }
1764 } 1763 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698