| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 // Partial test that the closed world computed from [WorldImpact]s derived from | 5 // Partial test that the closed world computed from [WorldImpact]s derived from |
| 6 // kernel is equivalent to the original computed from resolution. | 6 // kernel is equivalent to the original computed from resolution. |
| 7 library dart2js.kernel.closed_world_from_dill_test; | 7 library dart2js.kernel.closed_world_from_dill_test; |
| 8 | 8 |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 'main.dart': ''' | 33 'main.dart': ''' |
| 34 | 34 |
| 35 class ClassWithSetter { | 35 class ClassWithSetter { |
| 36 void set setter(_) {} | 36 void set setter(_) {} |
| 37 } | 37 } |
| 38 | 38 |
| 39 class Mixin { | 39 class Mixin { |
| 40 method1() {} | 40 method1() {} |
| 41 method2() {} | 41 method2() {} |
| 42 method3() {} | 42 method3() {} |
| 43 method4() {} |
| 44 var field; |
| 45 get property => 0; |
| 46 set property(_) {} |
| 43 } | 47 } |
| 44 class Class1 = Object with Mixin; | 48 class Class1 = Object with Mixin; |
| 45 class Class2 extends Object with Mixin { | 49 class Class2 extends Object with Mixin { |
| 46 method3() {} | 50 method3() {} |
| 51 method5() { |
| 52 super.method4(); |
| 53 super.property; |
| 54 super.property = null; |
| 55 super.field; |
| 56 super.field = null; |
| 57 } |
| 47 } | 58 } |
| 48 | 59 |
| 49 main() { | 60 main() { |
| 50 print('Hello World'); | 61 print('Hello World'); |
| 51 ''.contains; // Trigger member closurization. | 62 ''.contains; // Trigger member closurization. |
| 52 new ClassWithSetter().setter = null; | 63 new ClassWithSetter().setter = null; |
| 53 new Class1().method1(); | 64 new Class1().method1(); |
| 54 new Class2().method2(); | 65 new Class2().method2(); |
| 55 new Class2().method3(); | 66 new Class2().method3(); |
| 67 new Class2().method5(); |
| 56 } | 68 } |
| 57 ''' | 69 ''' |
| 58 }; | 70 }; |
| 59 | 71 |
| 60 main(List<String> args) { | 72 main(List<String> args) { |
| 61 asyncTest(() async { | 73 asyncTest(() async { |
| 62 await mainInternal(args); | 74 await mainInternal(args); |
| 63 }); | 75 }); |
| 64 } | 76 } |
| 65 | 77 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 enqueuer1, enqueuer2, elementEquivalence: equivalence.entityEquivalence, | 145 enqueuer1, enqueuer2, elementEquivalence: equivalence.entityEquivalence, |
| 134 typeEquivalence: (ResolutionDartType a, DartType b) { | 146 typeEquivalence: (ResolutionDartType a, DartType b) { |
| 135 return equivalence.typeEquivalence(unalias(a), b); | 147 return equivalence.typeEquivalence(unalias(a), b); |
| 136 }, elementFilter: elementFilter, verbose: arguments.verbose); | 148 }, elementFilter: elementFilter, verbose: arguments.verbose); |
| 137 | 149 |
| 138 checkClosedWorlds(closedWorld1, closedWorld2, | 150 checkClosedWorlds(closedWorld1, closedWorld2, |
| 139 strategy: equivalence.defaultStrategy, verbose: arguments.verbose); | 151 strategy: equivalence.defaultStrategy, verbose: arguments.verbose); |
| 140 | 152 |
| 141 return ResultKind.success; | 153 return ResultKind.success; |
| 142 } | 154 } |
| OLD | NEW |