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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 useColors: false, | 73 useColors: false, |
74 outputDart: dartGen, | 74 outputDart: dartGen, |
75 formatOutput: dartGen, | 75 formatOutput: dartGen, |
76 emitSourceMaps: sourceMaps, | 76 emitSourceMaps: sourceMaps, |
77 forceCompile: checkSdk, | 77 forceCompile: checkSdk, |
78 cheapTestFormat: checkSdk, | 78 cheapTestFormat: checkSdk, |
79 checkSdk: checkSdk, | 79 checkSdk: checkSdk, |
80 entryPointFile: entryPoint, | 80 entryPointFile: entryPoint, |
81 dartSdkPath: sdkPath, | 81 dartSdkPath: sdkPath, |
82 runtimeDir: runtimeDir, | 82 runtimeDir: runtimeDir, |
83 serverMode: serverMode); | 83 serverMode: serverMode, |
| 84 enableHashing: serverMode); |
84 return new Compiler(options).run(); | 85 return new Compiler(options).run(); |
85 } | 86 } |
86 var realSdk = getSdkDir(arguments).path; | 87 var realSdk = getSdkDir(arguments).path; |
87 | 88 |
88 // Remove old output, and `packages` symlinks which mess up the diff. | 89 // Remove old output, and `packages` symlinks which mess up the diff. |
89 var dir = new Directory(actualDir); | 90 var dir = new Directory(actualDir); |
90 if (dir.existsSync()) dir.deleteSync(recursive: true); | 91 if (dir.existsSync()) dir.deleteSync(recursive: true); |
91 var packagesDirs = new Directory(inputDir) | 92 var packagesDirs = new Directory(inputDir) |
92 .listSync(recursive: true) | 93 .listSync(recursive: true) |
93 .where((d) => d is Directory && path.basename(d.path) == 'packages'); | 94 .where((d) => d is Directory && path.basename(d.path) == 'packages'); |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 print('[AnalysisEngine] error $message $exception'); | 282 print('[AnalysisEngine] error $message $exception'); |
282 } | 283 } |
283 | 284 |
284 @override void logError2(String message, Object exception) { | 285 @override void logError2(String message, Object exception) { |
285 print('[AnalysisEngine] error $message $exception'); | 286 print('[AnalysisEngine] error $message $exception'); |
286 } | 287 } |
287 | 288 |
288 void logInformation(String message, [CaughtException exception]) {} | 289 void logInformation(String message, [CaughtException exception]) {} |
289 void logInformation2(String message, Object exception) {} | 290 void logInformation2(String message, Object exception) {} |
290 } | 291 } |
OLD | NEW |