| 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 "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart"; | 6 import "../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart"; |
| 7 import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t"; | 7 import "../../../sdk/lib/_internal/compiler/implementation/elements/elements.dar
t"; |
| 8 import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart"; | 8 import "../../../sdk/lib/_internal/compiler/implementation/tree/tree.dart"; |
| 9 import "../../../sdk/lib/_internal/compiler/implementation/util/util.dart"; | 9 import "../../../sdk/lib/_internal/compiler/implementation/util/util.dart"; |
| 10 import "mock_compiler.dart"; | 10 import "mock_compiler.dart"; |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 """); | 134 """); |
| 135 var classOrigin = ensure(compiler, "Class", compiler.coreLibrary.find, | 135 var classOrigin = ensure(compiler, "Class", compiler.coreLibrary.find, |
| 136 expectIsPatched: true); | 136 expectIsPatched: true); |
| 137 classOrigin.ensureResolved(compiler); | 137 classOrigin.ensureResolved(compiler); |
| 138 var classPatch = ensure(compiler, "Class", compiler.coreLibrary.patch.find, | 138 var classPatch = ensure(compiler, "Class", compiler.coreLibrary.patch.find, |
| 139 expectIsPatch: true); | 139 expectIsPatch: true); |
| 140 | 140 |
| 141 Expect.equals(classPatch, classOrigin.patch); | 141 Expect.equals(classPatch, classOrigin.patch); |
| 142 Expect.equals(classOrigin, classPatch.origin); | 142 Expect.equals(classOrigin, classPatch.origin); |
| 143 | 143 |
| 144 var constructorOrigin = ensure(compiler, "Class", | 144 var constructorOrigin = ensure(compiler, "", |
| 145 (name) => classOrigin.localLookup(name), | 145 (name) => classOrigin.localLookup(name), |
| 146 expectIsPatched: true); | 146 expectIsPatched: true); |
| 147 var constructorPatch = ensure(compiler, "Class", | 147 var constructorPatch = ensure(compiler, "", |
| 148 (name) => classPatch.localLookup(name), | 148 (name) => classPatch.localLookup(name), |
| 149 expectIsPatch: true); | 149 expectIsPatch: true); |
| 150 | 150 |
| 151 Expect.equals(constructorPatch, constructorOrigin.patch); | 151 Expect.equals(constructorPatch, constructorOrigin.patch); |
| 152 Expect.equals(constructorOrigin, constructorPatch.origin); | 152 Expect.equals(constructorOrigin, constructorPatch.origin); |
| 153 | 153 |
| 154 Expect.isTrue(compiler.warnings.isEmpty, | 154 Expect.isTrue(compiler.warnings.isEmpty, |
| 155 "Unexpected warnings: ${compiler.warnings}"); | 155 "Unexpected warnings: ${compiler.warnings}"); |
| 156 Expect.isTrue(compiler.errors.isEmpty, | 156 Expect.isTrue(compiler.errors.isEmpty, |
| 157 "Unexpected errors: ${compiler.errors}"); | 157 "Unexpected errors: ${compiler.errors}"); |
| (...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 789 testPatchNoGetter(); | 789 testPatchNoGetter(); |
| 790 testPatchNonSetter(); | 790 testPatchNonSetter(); |
| 791 testPatchNoSetter(); | 791 testPatchNoSetter(); |
| 792 testPatchNonFunction(); | 792 testPatchNonFunction(); |
| 793 | 793 |
| 794 testPatchAndSelector(); | 794 testPatchAndSelector(); |
| 795 | 795 |
| 796 testAnalyzeAllInjectedMembers(); | 796 testAnalyzeAllInjectedMembers(); |
| 797 testTypecheckPatchedMembers(); | 797 testTypecheckPatchedMembers(); |
| 798 } | 798 } |
| OLD | NEW |