| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // Test for iterators on for [SubclassNode]. | 5 // Test for iterators on for [SubclassNode]. |
| 6 | 6 |
| 7 library class_set_test; | 7 library class_set_test; |
| 8 | 8 |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import 'package:async_helper/async_helper.dart'; | 10 import 'package:async_helper/async_helper.dart'; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 main() { | 43 main() { |
| 44 new A(); | 44 new A(); |
| 45 new C(); | 45 new C(); |
| 46 new D(); | 46 new D(); |
| 47 new E(); | 47 new E(); |
| 48 new F(); | 48 new F(); |
| 49 new G(); | 49 new G(); |
| 50 } | 50 } |
| 51 """, | 51 """, |
| 52 useMockCompiler: false); | 52 useMockCompiler: false); |
| 53 ClosedWorld world = env.compiler.closedWorld; | 53 ClosedWorld world = env.closedWorld; |
| 54 | 54 |
| 55 ClassElement A = env.getElement("A"); | 55 ClassElement A = env.getElement("A"); |
| 56 ClassElement B = env.getElement("B"); | 56 ClassElement B = env.getElement("B"); |
| 57 ClassElement C = env.getElement("C"); | 57 ClassElement C = env.getElement("C"); |
| 58 ClassElement D = env.getElement("D"); | 58 ClassElement D = env.getElement("D"); |
| 59 ClassElement E = env.getElement("E"); | 59 ClassElement E = env.getElement("E"); |
| 60 ClassElement F = env.getElement("F"); | 60 ClassElement F = env.getElement("F"); |
| 61 ClassElement G = env.getElement("G"); | 61 ClassElement G = env.getElement("G"); |
| 62 | 62 |
| 63 void checkClass(ClassElement cls, | 63 void checkClass(ClassElement cls, |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 new C(); | 376 new C(); |
| 377 new D(); | 377 new D(); |
| 378 new E(); | 378 new E(); |
| 379 new F(); | 379 new F(); |
| 380 new G(); | 380 new G(); |
| 381 new H(); | 381 new H(); |
| 382 new I(); | 382 new I(); |
| 383 } | 383 } |
| 384 """, | 384 """, |
| 385 useMockCompiler: false); | 385 useMockCompiler: false); |
| 386 ClosedWorld world = env.compiler.closedWorld; | 386 ClosedWorld world = env.closedWorld; |
| 387 | 387 |
| 388 ClassElement A = env.getElement("A"); | 388 ClassElement A = env.getElement("A"); |
| 389 ClassElement B = env.getElement("B"); | 389 ClassElement B = env.getElement("B"); |
| 390 ClassElement C = env.getElement("C"); | 390 ClassElement C = env.getElement("C"); |
| 391 ClassElement D = env.getElement("D"); | 391 ClassElement D = env.getElement("D"); |
| 392 ClassElement E = env.getElement("E"); | 392 ClassElement E = env.getElement("E"); |
| 393 ClassElement F = env.getElement("F"); | 393 ClassElement F = env.getElement("F"); |
| 394 ClassElement G = env.getElement("G"); | 394 ClassElement G = env.getElement("G"); |
| 395 ClassElement H = env.getElement("H"); | 395 ClassElement H = env.getElement("H"); |
| 396 ClassElement I = env.getElement("I"); | 396 ClassElement I = env.getElement("I"); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 576 checkAny(B, [B, D], find: D, anySubtype: true, expectedResult: true); | 576 checkAny(B, [B, D], find: D, anySubtype: true, expectedResult: true); |
| 577 checkAny(B, [B, D, F, I], find: I, anySubtype: true, expectedResult: true); | 577 checkAny(B, [B, D, F, I], find: I, anySubtype: true, expectedResult: true); |
| 578 | 578 |
| 579 checkAny(X, [X, A, B, D, C, G, F, I, H, E], | 579 checkAny(X, [X, A, B, D, C, G, F, I, H, E], |
| 580 anySubtype: true, expectedResult: false); | 580 anySubtype: true, expectedResult: false); |
| 581 checkAny(X, [X, A], find: A, anySubtype: true, expectedResult: true); | 581 checkAny(X, [X, A], find: A, anySubtype: true, expectedResult: true); |
| 582 checkAny(X, [X, A, B, D], find: D, anySubtype: true, expectedResult: true); | 582 checkAny(X, [X, A, B, D], find: D, anySubtype: true, expectedResult: true); |
| 583 checkAny(X, [X, A, B, D, C, G, F, I], | 583 checkAny(X, [X, A, B, D, C, G, F, I], |
| 584 find: I, anySubtype: true, expectedResult: true); | 584 find: I, anySubtype: true, expectedResult: true); |
| 585 } | 585 } |
| OLD | NEW |