| 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 library mock_compiler; | 5 library mock_compiler; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | 7 import "package:expect/expect.dart"; |
| 8 import 'dart:collection'; | 8 import 'dart:collection'; |
| 9 import 'dart:uri'; | 9 import 'dart:uri'; |
| 10 | 10 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); | 192 interceptorsLibrary = createLibrary("interceptors", interceptorsSource); |
| 193 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); | 193 isolateHelperLibrary = createLibrary("isolate_helper", isolateHelperSource); |
| 194 | 194 |
| 195 // Set up the library imports. | 195 // Set up the library imports. |
| 196 importHelperLibrary(coreLibrary); | 196 importHelperLibrary(coreLibrary); |
| 197 libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null); | 197 libraryLoader.importLibrary(jsHelperLibrary, coreLibrary, null); |
| 198 libraryLoader.importLibrary(interceptorsLibrary, coreLibrary, null); | 198 libraryLoader.importLibrary(interceptorsLibrary, coreLibrary, null); |
| 199 libraryLoader.importLibrary(isolateHelperLibrary, coreLibrary, null); | 199 libraryLoader.importLibrary(isolateHelperLibrary, coreLibrary, null); |
| 200 | 200 |
| 201 assertMethod = jsHelperLibrary.find(buildSourceString('assert')); | 201 assertMethod = jsHelperLibrary.find(buildSourceString('assert')); |
| 202 identicalFunction = coreLibrary.find(buildSourceString('identical')); |
| 202 | 203 |
| 203 mainApp = mockLibrary(this, ""); | 204 mainApp = mockLibrary(this, ""); |
| 204 initializeSpecialClasses(); | 205 initializeSpecialClasses(); |
| 205 // We need to make sure the Object class is resolved. When registering a | 206 // We need to make sure the Object class is resolved. When registering a |
| 206 // dynamic invocation the ArgumentTypesRegistry eventually iterates over | 207 // dynamic invocation the ArgumentTypesRegistry eventually iterates over |
| 207 // the interfaces of the Object class which would be 'null' if the class | 208 // the interfaces of the Object class which would be 'null' if the class |
| 208 // wasn't resolved. | 209 // wasn't resolved. |
| 209 objectClass.ensureResolved(this); | 210 objectClass.ensureResolved(this); |
| 210 | 211 |
| 211 // Our unit tests check code generation output that is affected by | 212 // Our unit tests check code generation output that is affected by |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 } | 394 } |
| 394 } | 395 } |
| 395 | 396 |
| 396 class MockDeferredLoadTask extends DeferredLoadTask { | 397 class MockDeferredLoadTask extends DeferredLoadTask { |
| 397 MockDeferredLoadTask(Compiler compiler) : super(compiler); | 398 MockDeferredLoadTask(Compiler compiler) : super(compiler); |
| 398 | 399 |
| 399 void registerMainApp(LibraryElement mainApp) { | 400 void registerMainApp(LibraryElement mainApp) { |
| 400 // Do nothing. | 401 // Do nothing. |
| 401 } | 402 } |
| 402 } | 403 } |
| OLD | NEW |