OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 import 'dart:async'; | 5 import 'dart:async'; |
6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
7 import 'package:async_helper/async_helper.dart'; | 7 import 'package:async_helper/async_helper.dart'; |
8 import 'package:compiler/src/compiler.dart'; | 8 import 'package:compiler/src/compiler.dart'; |
9 import 'package:compiler/src/diagnostics/messages.dart' show | 9 import 'package:compiler/src/diagnostics/messages.dart' show |
10 MessageKind; | 10 MessageKind; |
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
937 @patch void clear() {} | 937 @patch void clear() {} |
938 } | 938 } |
939 """, | 939 """, |
940 main: """ | 940 main: """ |
941 main () { | 941 main () { |
942 new A(); // ensure A and B are instantiated | 942 new A(); // ensure A and B are instantiated |
943 new B(); | 943 new B(); |
944 } | 944 } |
945 """, | 945 """, |
946 runCompiler: true, analyzeOnly: true); | 946 runCompiler: true, analyzeOnly: true); |
947 World world = compiler.world; | 947 World world = compiler.openWorld; |
948 world.populate(); | 948 world.populate(); |
949 | 949 |
950 ClassElement cls = ensure(compiler, "A", | 950 ClassElement cls = ensure(compiler, "A", |
951 compiler.commonElements.coreLibrary.find, expectIsPatched: true); | 951 compiler.commonElements.coreLibrary.find, expectIsPatched: true); |
952 cls.ensureResolved(compiler.resolution); | 952 cls.ensureResolved(compiler.resolution); |
953 | 953 |
954 ensure(compiler, "method", cls.patch.lookupLocalMember, | 954 ensure(compiler, "method", cls.patch.lookupLocalMember, |
955 checkHasBody: true, expectIsRegular: true); | 955 checkHasBody: true, expectIsRegular: true); |
956 | 956 |
957 ensure(compiler, "clear", cls.lookupLocalMember, | 957 ensure(compiler, "clear", cls.lookupLocalMember, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1138 await testPatchNonFunction(); | 1138 await testPatchNonFunction(); |
1139 | 1139 |
1140 await testPatchAndSelector(); | 1140 await testPatchAndSelector(); |
1141 | 1141 |
1142 await testEffectiveTarget(); | 1142 await testEffectiveTarget(); |
1143 | 1143 |
1144 await testAnalyzeAllInjectedMembers(); | 1144 await testAnalyzeAllInjectedMembers(); |
1145 await testTypecheckPatchedMembers(); | 1145 await testTypecheckPatchedMembers(); |
1146 }); | 1146 }); |
1147 } | 1147 } |
OLD | NEW |