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

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

Issue 805683002: fix invocation completion test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merge Created 6 years 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/mock_sdk.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.hierarchy; 5 library test.services.src.search.hierarchy;
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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 B.named() {} 213 B.named() {}
214 var mb1; 214 var mb1;
215 mb2() {} 215 mb2() {}
216 } 216 }
217 '''); 217 ''');
218 { 218 {
219 ClassElement classA = findElement('A'); 219 ClassElement classA = findElement('A');
220 List<Element> members = getMembers(classA); 220 List<Element> members = getMembers(classA);
221 expect( 221 expect(
222 members.map((e) => e.name), 222 members.map((e) => e.name),
223 unorderedEquals(['ma1', 'ma2', '==', 'toString'])); 223 unorderedEquals(['ma1', 'ma2', '==', 'toString', 'hashCode']));
224 } 224 }
225 { 225 {
226 ClassElement classB = findElement('B'); 226 ClassElement classB = findElement('B');
227 List<Element> members = getMembers(classB); 227 List<Element> members = getMembers(classB);
228 expect( 228 expect(
229 members.map((e) => e.name), 229 members.map((e) => e.name),
230 unorderedEquals(['mb1', 'mb2', 'ma1', 'ma2', '==', 'toString'])); 230 unorderedEquals(['mb1', 'mb2', 'ma1', 'ma2', '==', 'toString', 'hashCo de']));
231 } 231 }
232 } 232 }
233 233
234 Future test_getSubClasses() { 234 Future test_getSubClasses() {
235 _indexTestUnit(''' 235 _indexTestUnit('''
236 class A {} 236 class A {}
237 class B extends A {} 237 class B extends A {}
238 class C extends B {} 238 class C extends B {}
239 class D extends B implements A {} 239 class D extends B implements A {}
240 class M {} 240 class M {}
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 Set<ClassElement> supers = getSuperClasses(classF); 313 Set<ClassElement> supers = getSuperClasses(classF);
314 expect(supers, unorderedEquals([objectElement, classA])); 314 expect(supers, unorderedEquals([objectElement, classA]));
315 } 315 }
316 } 316 }
317 317
318 void _indexTestUnit(String code) { 318 void _indexTestUnit(String code) {
319 resolveTestUnit(code); 319 resolveTestUnit(code);
320 index.indexUnit(context, testUnit); 320 index.indexUnit(context, testUnit);
321 } 321 }
322 } 322 }
OLDNEW
« no previous file with comments | « pkg/analysis_server/test/mock_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698