| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 /// Tests code generation. | 5 /// Tests code generation. |
| 6 /// Runs Dart Dev Compiler on all input in the `codegen` directory and checks | 6 /// Runs Dart Dev Compiler on all input in the `codegen` directory and checks |
| 7 /// that the output is what we expected. | 7 /// that the output is what we expected. |
| 8 library dev_compiler.test.codegen_test; | 8 library dev_compiler.test.codegen_test; |
| 9 | 9 |
| 10 import 'dart:io'; | 10 import 'dart:io'; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 .where((f) => f is File) | 55 .where((f) => f is File) |
| 56 .map((f) => f.path) | 56 .map((f) => f.path) |
| 57 .where((p) => p.endsWith('.dart') && filePattern.hasMatch(p)); | 57 .where((p) => p.endsWith('.dart') && filePattern.hasMatch(p)); |
| 58 | 58 |
| 59 compile(String entryPoint, String sdkPath, {bool checkSdk: false, | 59 compile(String entryPoint, String sdkPath, {bool checkSdk: false, |
| 60 bool serverMode: false, bool sourceMaps: false, String subDir}) { | 60 bool serverMode: false, bool sourceMaps: false, String subDir}) { |
| 61 // TODO(jmesserly): add a way to specify flags in the test file, so | 61 // TODO(jmesserly): add a way to specify flags in the test file, so |
| 62 // they're more self-contained. | 62 // they're more self-contained. |
| 63 var runtimeDir = path.join(path.dirname(testDirectory), 'lib', 'runtime'); | 63 var runtimeDir = path.join(path.dirname(testDirectory), 'lib', 'runtime'); |
| 64 var options = new CompilerOptions( | 64 var options = new CompilerOptions( |
| 65 allowConstCasts: true, | |
| 66 outputDir: subDir == null ? actualDir : path.join(actualDir, subDir), | 65 outputDir: subDir == null ? actualDir : path.join(actualDir, subDir), |
| 67 useColors: false, | 66 useColors: false, |
| 68 emitSourceMaps: sourceMaps, | 67 emitSourceMaps: sourceMaps, |
| 69 forceCompile: checkSdk, | 68 forceCompile: checkSdk, |
| 70 checkSdk: checkSdk, | 69 checkSdk: checkSdk, |
| 71 entryPointFile: entryPoint, | 70 entryPointFile: entryPoint, |
| 72 dartSdkPath: sdkPath, | 71 dartSdkPath: sdkPath, |
| 73 runtimeDir: runtimeDir, | 72 runtimeDir: runtimeDir, |
| 74 serverMode: serverMode, | 73 serverMode: serverMode, |
| 75 enableHashing: serverMode); | 74 enableHashing: serverMode); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 print('[AnalysisEngine] error $message $exception'); | 265 print('[AnalysisEngine] error $message $exception'); |
| 267 } | 266 } |
| 268 | 267 |
| 269 @override void logError2(String message, Object exception) { | 268 @override void logError2(String message, Object exception) { |
| 270 print('[AnalysisEngine] error $message $exception'); | 269 print('[AnalysisEngine] error $message $exception'); |
| 271 } | 270 } |
| 272 | 271 |
| 273 void logInformation(String message, [CaughtException exception]) {} | 272 void logInformation(String message, [CaughtException exception]) {} |
| 274 void logInformation2(String message, Object exception) {} | 273 void logInformation2(String message, Object exception) {} |
| 275 } | 274 } |
| OLD | NEW |