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