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

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

Issue 2032893002: Fix two build failures - for typeProvider and findElement. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
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_internal; 5 library test.services.src.search.search_engine_internal;
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/search/search_engine.dart'; 10 import 'package:analysis_server/src/services/search/search_engine.dart';
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 print(field); // ref-nq 280 print(field); // ref-nq
281 print(this.field); // ref-q 281 print(this.field); // ref-q
282 field(); // inv-nq 282 field(); // inv-nq
283 this.field(); // inv-q 283 this.field(); // inv-q
284 // setter 284 // setter
285 field = 2; // ref-nq; 285 field = 2; // ref-nq;
286 this.field = 3; // ref-q; 286 this.field = 3; // ref-q;
287 } 287 }
288 } 288 }
289 '''); 289 ''');
290 FieldElement element = findElement('field'); 290 FieldElement element = findElement('field', ElementKind.FIELD);
291 Element main = findElement('main'); 291 Element main = findElement('main');
292 Element fieldParameter = findElement('field', ElementKind.PARAMETER); 292 Element fieldParameter = findElement('field', ElementKind.PARAMETER);
293 var expected = [ 293 var expected = [
294 _expectIdQ(fieldParameter, MatchKind.WRITE, 'field}'), 294 _expectIdQ(fieldParameter, MatchKind.WRITE, 'field}'),
295 _expectIdQ(main, MatchKind.REFERENCE, 'field: 1'), 295 _expectIdQ(main, MatchKind.REFERENCE, 'field: 1'),
296 _expectId(main, MatchKind.READ, 'field); // ref-nq'), 296 _expectId(main, MatchKind.READ, 'field); // ref-nq'),
297 _expectIdQ(main, MatchKind.READ, 'field); // ref-q'), 297 _expectIdQ(main, MatchKind.READ, 'field); // ref-q'),
298 _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'), 298 _expectId(main, MatchKind.INVOCATION, 'field(); // inv-nq'),
299 _expectIdQ(main, MatchKind.INVOCATION, 'field(); // inv-q'), 299 _expectIdQ(main, MatchKind.INVOCATION, 'field(); // inv-q'),
300 _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'), 300 _expectId(main, MatchKind.WRITE, 'field = 2; // ref-nq'),
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 List<SearchMatch> matches = await searchEngine.searchReferences(element); 899 List<SearchMatch> matches = await searchEngine.searchReferences(element);
900 _assertMatches(matches, expectedMatches); 900 _assertMatches(matches, expectedMatches);
901 expect(matches, hasLength(expectedMatches.length)); 901 expect(matches, hasLength(expectedMatches.length));
902 } 902 }
903 903
904 static void _assertMatches( 904 static void _assertMatches(
905 List<SearchMatch> matches, List<ExpectedMatch> expectedMatches) { 905 List<SearchMatch> matches, List<ExpectedMatch> expectedMatches) {
906 expect(matches, unorderedEquals(expectedMatches)); 906 expect(matches, unorderedEquals(expectedMatches));
907 } 907 }
908 } 908 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/context/context.dart » ('j') | pkg/analyzer/lib/src/context/context.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698