| 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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 int maxConcreteTypeSize: 5, | 67 int maxConcreteTypeSize: 5, |
| 68 bool disableTypeInference: false, | 68 bool disableTypeInference: false, |
| 69 bool analyzeAll: false, | 69 bool analyzeAll: false, |
| 70 bool analyzeOnly: false, | 70 bool analyzeOnly: false, |
| 71 bool emitJavaScript: true, | 71 bool emitJavaScript: true, |
| 72 bool preserveComments: false, | 72 bool preserveComments: false, |
| 73 // Our unit tests check code generation output that is | 73 // Our unit tests check code generation output that is |
| 74 // affected by inlining support. | 74 // affected by inlining support. |
| 75 bool disableInlining: true, | 75 bool disableInlining: true, |
| 76 bool trustTypeAnnotations: false, | 76 bool trustTypeAnnotations: false, |
| 77 bool enableAsyncAwait: false, |
| 77 int this.expectedWarnings, | 78 int this.expectedWarnings, |
| 78 int this.expectedErrors, | 79 int this.expectedErrors, |
| 79 api.CompilerOutputProvider outputProvider, | 80 api.CompilerOutputProvider outputProvider, |
| 80 String patchVersion}) | 81 String patchVersion}) |
| 81 : sourceFiles = new Map<String, SourceFile>(), | 82 : sourceFiles = new Map<String, SourceFile>(), |
| 82 testedPatchVersion = patchVersion, | 83 testedPatchVersion = patchVersion, |
| 83 super(enableTypeAssertions: enableTypeAssertions, | 84 super(enableTypeAssertions: enableTypeAssertions, |
| 84 enableMinification: enableMinification, | 85 enableMinification: enableMinification, |
| 85 enableConcreteTypeInference: enableConcreteTypeInference, | 86 enableConcreteTypeInference: enableConcreteTypeInference, |
| 86 maxConcreteTypeSize: maxConcreteTypeSize, | 87 maxConcreteTypeSize: maxConcreteTypeSize, |
| 87 disableTypeInferenceFlag: disableTypeInference, | 88 disableTypeInferenceFlag: disableTypeInference, |
| 88 analyzeAllFlag: analyzeAll, | 89 analyzeAllFlag: analyzeAll, |
| 89 analyzeOnly: analyzeOnly, | 90 analyzeOnly: analyzeOnly, |
| 90 emitJavaScript: emitJavaScript, | 91 emitJavaScript: emitJavaScript, |
| 91 preserveComments: preserveComments, | 92 preserveComments: preserveComments, |
| 92 trustTypeAnnotations: trustTypeAnnotations, | 93 trustTypeAnnotations: trustTypeAnnotations, |
| 93 showPackageWarnings: true, | 94 showPackageWarnings: true, |
| 94 outputProvider: outputProvider) { | 95 outputProvider: outputProvider, |
| 96 enableAsyncAwait: enableAsyncAwait) { |
| 95 this.disableInlining = disableInlining; | 97 this.disableInlining = disableInlining; |
| 96 | 98 |
| 97 deferredLoadTask = new MockDeferredLoadTask(this); | 99 deferredLoadTask = new MockDeferredLoadTask(this); |
| 98 | 100 |
| 99 clearMessages(); | 101 clearMessages(); |
| 100 | 102 |
| 101 registerSource(Compiler.DART_CORE, | 103 registerSource(Compiler.DART_CORE, |
| 102 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); | 104 buildLibrarySource(DEFAULT_CORE_LIBRARY, coreSource)); |
| 103 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); | 105 registerSource(PATCH_CORE, DEFAULT_PATCH_CORE_SOURCE); |
| 104 | 106 |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 392 MockElement(Element enclosingElement) | 394 MockElement(Element enclosingElement) |
| 393 : super('', ElementKind.FUNCTION, Modifiers.EMPTY, | 395 : super('', ElementKind.FUNCTION, Modifiers.EMPTY, |
| 394 enclosingElement, false); | 396 enclosingElement, false); |
| 395 | 397 |
| 396 get node => null; | 398 get node => null; |
| 397 | 399 |
| 398 parseNode(_) => null; | 400 parseNode(_) => null; |
| 399 | 401 |
| 400 bool get hasNode => false; | 402 bool get hasNode => false; |
| 401 } | 403 } |
| OLD | NEW |