| 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 28 matching lines...) Expand all Loading... |
| 39 class G extends C {} | 39 class G extends C {} |
| 40 """, mainSource: r""" | 40 """, mainSource: r""" |
| 41 main() { | 41 main() { |
| 42 new A(); | 42 new A(); |
| 43 new C(); | 43 new C(); |
| 44 new D(); | 44 new D(); |
| 45 new E(); | 45 new E(); |
| 46 new F(); | 46 new F(); |
| 47 new G(); | 47 new G(); |
| 48 } | 48 } |
| 49 """, useMockCompiler: false); | 49 """, compileMode: CompileMode.memory); |
| 50 ClosedWorld world = env.closedWorld; | 50 ClosedWorld world = env.closedWorld; |
| 51 | 51 |
| 52 ClassElement A = env.getElement("A"); | 52 ClassElement A = env.getElement("A"); |
| 53 ClassElement B = env.getElement("B"); | 53 ClassElement B = env.getElement("B"); |
| 54 ClassElement C = env.getElement("C"); | 54 ClassElement C = env.getElement("C"); |
| 55 ClassElement D = env.getElement("D"); | 55 ClassElement D = env.getElement("D"); |
| 56 ClassElement E = env.getElement("E"); | 56 ClassElement E = env.getElement("E"); |
| 57 ClassElement F = env.getElement("F"); | 57 ClassElement F = env.getElement("F"); |
| 58 ClassElement G = env.getElement("G"); | 58 ClassElement G = env.getElement("G"); |
| 59 | 59 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 main() { | 369 main() { |
| 370 new A(); | 370 new A(); |
| 371 new C(); | 371 new C(); |
| 372 new D(); | 372 new D(); |
| 373 new E(); | 373 new E(); |
| 374 new F(); | 374 new F(); |
| 375 new G(); | 375 new G(); |
| 376 new H(); | 376 new H(); |
| 377 new I(); | 377 new I(); |
| 378 } | 378 } |
| 379 """, useMockCompiler: false); | 379 """, compileMode: CompileMode.memory); |
| 380 ClosedWorld world = env.closedWorld; | 380 ClosedWorld world = env.closedWorld; |
| 381 | 381 |
| 382 ClassElement A = env.getElement("A"); | 382 ClassElement A = env.getElement("A"); |
| 383 ClassElement B = env.getElement("B"); | 383 ClassElement B = env.getElement("B"); |
| 384 ClassElement C = env.getElement("C"); | 384 ClassElement C = env.getElement("C"); |
| 385 ClassElement D = env.getElement("D"); | 385 ClassElement D = env.getElement("D"); |
| 386 ClassElement E = env.getElement("E"); | 386 ClassElement E = env.getElement("E"); |
| 387 ClassElement F = env.getElement("F"); | 387 ClassElement F = env.getElement("F"); |
| 388 ClassElement G = env.getElement("G"); | 388 ClassElement G = env.getElement("G"); |
| 389 ClassElement H = env.getElement("H"); | 389 ClassElement H = env.getElement("H"); |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 checkAny(B, [B, D], find: D, anySubtype: true, expectedResult: true); | 571 checkAny(B, [B, D], find: D, anySubtype: true, expectedResult: true); |
| 572 checkAny(B, [B, D, F, I], find: I, anySubtype: true, expectedResult: true); | 572 checkAny(B, [B, D, F, I], find: I, anySubtype: true, expectedResult: true); |
| 573 | 573 |
| 574 checkAny(X, [X, A, B, D, C, G, F, I, H, E], | 574 checkAny(X, [X, A, B, D, C, G, F, I, H, E], |
| 575 anySubtype: true, expectedResult: false); | 575 anySubtype: true, expectedResult: false); |
| 576 checkAny(X, [X, A], find: A, anySubtype: true, expectedResult: true); | 576 checkAny(X, [X, A], find: A, anySubtype: true, expectedResult: true); |
| 577 checkAny(X, [X, A, B, D], find: D, anySubtype: true, expectedResult: true); | 577 checkAny(X, [X, A, B, D], find: D, anySubtype: true, expectedResult: true); |
| 578 checkAny(X, [X, A, B, D, C, G, F, I], | 578 checkAny(X, [X, A, B, D, C, G, F, I], |
| 579 find: I, anySubtype: true, expectedResult: true); | 579 find: I, anySubtype: true, expectedResult: true); |
| 580 } | 580 } |
| OLD | NEW |