| 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:async'; | 8 import 'dart:async'; |
| 9 import 'dart:collection'; | 9 import 'dart:collection'; |
| 10 | 10 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 // Do nothing. The mock core library is already handled in the constructor. | 272 // Do nothing. The mock core library is already handled in the constructor. |
| 273 return new Future.value(); | 273 return new Future.value(); |
| 274 } | 274 } |
| 275 | 275 |
| 276 Future<LibraryElement> scanBuiltinLibrary(String name) { | 276 Future<LibraryElement> scanBuiltinLibrary(String name) { |
| 277 // Do nothing. The mock core library is already handled in the constructor. | 277 // Do nothing. The mock core library is already handled in the constructor. |
| 278 return new Future.value(); | 278 return new Future.value(); |
| 279 } | 279 } |
| 280 | 280 |
| 281 Uri translateResolvedUri(LibraryElement importingLibrary, | 281 Uri translateResolvedUri(LibraryElement importingLibrary, |
| 282 Uri resolvedUri, Node node) => resolvedUri; | 282 Uri resolvedUri, Spannable spannable) => resolvedUri; |
| 283 | 283 |
| 284 // The mock library doesn't need any patches. | 284 // The mock library doesn't need any patches. |
| 285 Uri resolvePatchUri(String dartLibraryName) { | 285 Uri resolvePatchUri(String dartLibraryName) { |
| 286 if (dartLibraryName == 'core') { | 286 if (dartLibraryName == 'core') { |
| 287 return PATCH_CORE; | 287 return PATCH_CORE; |
| 288 } | 288 } |
| 289 return null; | 289 return null; |
| 290 } | 290 } |
| 291 | 291 |
| 292 Future<Script> readScript(Spannable node, Uri uri) { | 292 Future<Script> readScript(Spannable node, Uri uri) { |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 enableMinification: minify, | 458 enableMinification: minify, |
| 459 trustTypeAnnotations: trustTypeAnnotations, | 459 trustTypeAnnotations: trustTypeAnnotations, |
| 460 enableTypeAssertions: enableTypeAssertions, | 460 enableTypeAssertions: enableTypeAssertions, |
| 461 expectedErrors: expectedErrors, | 461 expectedErrors: expectedErrors, |
| 462 expectedWarnings: expectedWarnings, | 462 expectedWarnings: expectedWarnings, |
| 463 outputProvider: outputProvider); | 463 outputProvider: outputProvider); |
| 464 compiler.registerSource(uri, code); | 464 compiler.registerSource(uri, code); |
| 465 compiler.diagnosticHandler = createHandler(compiler, code); | 465 compiler.diagnosticHandler = createHandler(compiler, code); |
| 466 return compiler; | 466 return compiler; |
| 467 } | 467 } |
| OLD | NEW |