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

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

Issue 975743002: Restore the test for an unknown element search. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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 | « no previous file | 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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 '''); 211 ''');
212 ConstructorElement element = findElement('named'); 212 ConstructorElement element = findElement('named');
213 Element mainElement = findElement('main'); 213 Element mainElement = findElement('main');
214 var expected = [ 214 var expected = [
215 _expectId(mainElement, MatchKind.REFERENCE, '.named();', length: 6) 215 _expectId(mainElement, MatchKind.REFERENCE, '.named();', length: 6)
216 ]; 216 ];
217 return _verifyReferences(element, expected); 217 return _verifyReferences(element, expected);
218 } 218 }
219 219
220 Future test_searchReferences_Element_unknown() { 220 Future test_searchReferences_Element_unknown() {
221 // TODO(scheglov) implement some test 221 return _verifyReferences(DynamicElementImpl.instance, []);
222 // return _verifyReferences(UniverseElement.INSTANCE, []);
223 } 222 }
224 223
225 Future test_searchReferences_FieldElement() { 224 Future test_searchReferences_FieldElement() {
226 _indexTestUnit(''' 225 _indexTestUnit('''
227 class A { 226 class A {
228 var field; 227 var field;
229 A({this.field}); 228 A({this.field});
230 main() { 229 main() {
231 new A(field: 1); 230 new A(field: 1);
232 // getter 231 // getter
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 .then((List<SearchMatch> matches) { 642 .then((List<SearchMatch> matches) {
644 _assertMatches(matches, expectedMatches); 643 _assertMatches(matches, expectedMatches);
645 }); 644 });
646 } 645 }
647 646
648 static void _assertMatches( 647 static void _assertMatches(
649 List<SearchMatch> matches, List<ExpectedMatch> expectedMatches) { 648 List<SearchMatch> matches, List<ExpectedMatch> expectedMatches) {
650 expect(matches, unorderedEquals(expectedMatches)); 649 expect(matches, unorderedEquals(expectedMatches));
651 } 650 }
652 } 651 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698