| OLD | NEW |
| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library test.services.src.search.hierarchy; | 8 library test.services.src.search.hierarchy; |
| 9 | 9 |
| 10 import 'dart:async'; | 10 import 'dart:async'; |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 class B extends A { | 216 class B extends A { |
| 217 B() {} | 217 B() {} |
| 218 B.named() {} | 218 B.named() {} |
| 219 var mb1; | 219 var mb1; |
| 220 mb2() {} | 220 mb2() {} |
| 221 } | 221 } |
| 222 '''); | 222 '''); |
| 223 { | 223 { |
| 224 ClassElement classA = findElement('A'); | 224 ClassElement classA = findElement('A'); |
| 225 List<Element> members = getMembers(classA); | 225 List<Element> members = getMembers(classA); |
| 226 expect(members.map((e) => e.name), unorderedEquals(['ma1', 'ma2'])); | 226 expect(members.map((e) => e.name), unorderedEquals(['ma1', 'ma2', '=='])); |
| 227 } | 227 } |
| 228 { | 228 { |
| 229 ClassElement classB = findElement('B'); | 229 ClassElement classB = findElement('B'); |
| 230 List<Element> members = getMembers(classB); | 230 List<Element> members = getMembers(classB); |
| 231 expect( | 231 expect( |
| 232 members.map((e) => e.name), | 232 members.map((e) => e.name), |
| 233 unorderedEquals(['mb1', 'mb2', 'ma1', 'ma2'])); | 233 unorderedEquals(['mb1', 'mb2', 'ma1', 'ma2', '=='])); |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 | 236 |
| 237 Future test_getSubClasses() { | 237 Future test_getSubClasses() { |
| 238 _indexTestUnit(''' | 238 _indexTestUnit(''' |
| 239 class A {} | 239 class A {} |
| 240 class B extends A {} | 240 class B extends A {} |
| 241 class C extends B {} | 241 class C extends B {} |
| 242 class D extends B implements A {} | 242 class D extends B implements A {} |
| 243 class M {} | 243 class M {} |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 Set<ClassElement> supers = getSuperClasses(classF); | 316 Set<ClassElement> supers = getSuperClasses(classF); |
| 317 expect(supers, unorderedEquals([objectElement, classA])); | 317 expect(supers, unorderedEquals([objectElement, classA])); |
| 318 } | 318 } |
| 319 } | 319 } |
| 320 | 320 |
| 321 void _indexTestUnit(String code) { | 321 void _indexTestUnit(String code) { |
| 322 resolveTestUnit(code); | 322 resolveTestUnit(code); |
| 323 index.indexUnit(context, testUnit); | 323 index.indexUnit(context, testUnit); |
| 324 } | 324 } |
| 325 } | 325 } |
| OLD | NEW |