| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 tests.forEach((name, contents) { | 107 tests.forEach((name, contents) { |
| 108 new File(path.join(languageDir, '${filename}_${name}_multi.dart')) | 108 new File(path.join(languageDir, '${filename}_${name}_multi.dart')) |
| 109 .writeAsStringSync(contents); | 109 .writeAsStringSync(contents); |
| 110 }); | 110 }); |
| 111 } | 111 } |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 for (var dir in [null, 'language']) { | 115 for (var dir in [null, 'language']) { |
| 116 if (codeCoverage && dir == 'language') continue; | 116 if (codeCoverage && dir == 'language') continue; |
| 117 | 117 |
| 118 group('dartdevc ' + path.join('test', 'codegen', dir), () { | 118 group('dartdevc ' + path.join('test', 'codegen', dir), () { |
| 119 var outDir = new Directory(path.join(expectDir, dir)); | 119 var outDir = new Directory(path.join(expectDir, dir)); |
| 120 if (!outDir.existsSync()) outDir.createSync(recursive: true); | 120 if (!outDir.existsSync()) outDir.createSync(recursive: true); |
| 121 | 121 |
| 122 var testFiles = _findTests(path.join(inputDir, dir), filePattern); | 122 var testFiles = _findTests(path.join(inputDir, dir), filePattern); |
| 123 for (var filePath in testFiles) { | 123 for (var filePath in testFiles) { |
| 124 if (multitests.contains(filePath)) continue; | 124 if (multitests.contains(filePath)) continue; |
| 125 | 125 |
| 126 var filename = path.basenameWithoutExtension(filePath); | 126 var filename = path.basenameWithoutExtension(filePath); |
| 127 | 127 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 print('[AnalysisEngine] error $message $exception'); | 236 print('[AnalysisEngine] error $message $exception'); |
| 237 } | 237 } |
| 238 | 238 |
| 239 @override void logError2(String message, Object exception) { | 239 @override void logError2(String message, Object exception) { |
| 240 print('[AnalysisEngine] error $message $exception'); | 240 print('[AnalysisEngine] error $message $exception'); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void logInformation(String message, [CaughtException exception]) {} | 243 void logInformation(String message, [CaughtException exception]) {} |
| 244 void logInformation2(String message, Object exception) {} | 244 void logInformation2(String message, Object exception) {} |
| 245 } | 245 } |
| OLD | NEW |