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

Side by Side Diff: pkg/analysis_server/test/services/search/search_engine_test.dart

Issue 949623005: Field references in field format parameter declarations and initializers mean writing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analysis_server/test/services/index/dart_index_contributor_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.search.search_engine; 5 library test.services.src.search.search_engine;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:analysis_server/src/services/index/index.dart'; 9 import 'package:analysis_server/src/services/index/index.dart';
10 import 'package:analysis_server/src/services/index/local_memory_index.dart'; 10 import 'package:analysis_server/src/services/index/local_memory_index.dart';
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // setter 236 // setter
237 field = 2; // ref-nq; 237 field = 2; // ref-nq;
238 this.field = 3; // ref-q; 238 this.field = 3; // ref-q;
239 } 239 }
240 } 240 }
241 '''); 241 ''');
242 FieldElement element = findElement('field'); 242 FieldElement element = findElement('field');
243 Element main = findElement('main'); 243 Element main = findElement('main');
244 Element fieldParameter = findElement('field', ElementKind.PARAMETER); 244 Element fieldParameter = findElement('field', ElementKind.PARAMETER);
245 var expected = [ 245 var expected = [
246 _expectId(fieldParameter, MatchKind.REFERENCE, 'field}'), 246 _expectId(fieldParameter, MatchKind.WRITE, 'field}'),
247 _expectId(main, MatchKind.REFERENCE, 'field: 1'), 247 _expectId(main, MatchKind.REFERENCE, 'field: 1'),
248 _expectId(main, MatchKind.READ, 'field); // ref-nq'), 248 _expectId(main, MatchKind.READ, 'field); // ref-nq'),
249 _expectIdQ(main, MatchKind.READ, 'field); // ref-q'), 249 _expectIdQ(main, MatchKind.READ, 'field); // ref-q'),
250 _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'), 250 _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'),
251 _expectIdQ(main, MatchKind.INVOCATION, 'field(); // inv-q'), 251 _expectIdQ(main, MatchKind.INVOCATION, 'field(); // inv-q'),
252 _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'), 252 _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'),
253 _expectIdQ(main, MatchKind.WRITE, 'field = 3; // ref-q'),]; 253 _expectIdQ(main, MatchKind.WRITE, 'field = 3; // ref-q'),];
254 return _verifyReferences(element, expected); 254 return _verifyReferences(element, expected);
255 } 255 }
256 256
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
638 pattern).then((List<SearchMatch> matches) { 638 pattern).then((List<SearchMatch> matches) {
639 _assertMatches(matches, expectedMatches); 639 _assertMatches(matches, expectedMatches);
640 }); 640 });
641 } 641 }
642 642
643 static void _assertMatches(List<SearchMatch> matches, 643 static void _assertMatches(List<SearchMatch> matches,
644 List<ExpectedMatch> expectedMatches) { 644 List<ExpectedMatch> expectedMatches) {
645 expect(matches, unorderedEquals(expectedMatches)); 645 expect(matches, unorderedEquals(expectedMatches));
646 } 646 }
647 } 647 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/services/index/dart_index_contributor_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698