Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Side by Side Diff: test/codegen_test.dart

Issue 1633003002: Add --modules=node support (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged master Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/codegen/node_modules.dart ('k') | tool/input_sdk/lib/html/ddc/html_ddc.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 var filename = path.basenameWithoutExtension(filePath); 146 var filename = path.basenameWithoutExtension(filePath);
147 147
148 test('$filename.dart', () { 148 test('$filename.dart', () {
149 // TODO(jmesserly): this was added to get some coverage of source maps 149 // TODO(jmesserly): this was added to get some coverage of source maps
150 // and closure annotations. 150 // and closure annotations.
151 // We need a more comprehensive strategy to test them. 151 // We need a more comprehensive strategy to test them.
152 var sourceMaps = filename == 'map_keys'; 152 var sourceMaps = filename == 'map_keys';
153 var closure = filename == 'closure'; 153 var closure = filename == 'closure';
154 var moduleFormat = filename == 'es6_modules' 154 var moduleFormat = filename == 'es6_modules'
155 ? ModuleFormat.es6 155 ? ModuleFormat.es6
156 : ModuleFormat.legacy; 156 : filename == 'node_modules'
157 ? ModuleFormat.node
158 : ModuleFormat.legacy;
157 var success; 159 var success;
158 // TODO(vsm): Is it okay to reuse the same context here? If there is 160 // TODO(vsm): Is it okay to reuse the same context here? If there is
159 // overlap between test files, we may need separate ones for each 161 // overlap between test files, we may need separate ones for each
160 // compiler. 162 // compiler.
161 var compiler = 163 var compiler =
162 (sourceMaps || closure || moduleFormat != ModuleFormat.legacy) 164 (sourceMaps || closure || moduleFormat != ModuleFormat.legacy)
163 ? createCompiler(realSdkContext, 165 ? createCompiler(realSdkContext,
164 sourceMaps: sourceMaps, 166 sourceMaps: sourceMaps,
165 closure: closure, 167 closure: closure,
166 moduleFormat: moduleFormat) 168 moduleFormat: moduleFormat)
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 249
248 /// An implementation of analysis engine's [Logger] that prints. 250 /// An implementation of analysis engine's [Logger] that prints.
249 class PrintLogger implements Logger { 251 class PrintLogger implements Logger {
250 @override void logError(String message, [CaughtException exception]) { 252 @override void logError(String message, [CaughtException exception]) {
251 print('[AnalysisEngine] error $message $exception'); 253 print('[AnalysisEngine] error $message $exception');
252 } 254 }
253 255
254 void logInformation(String message, [CaughtException exception]) {} 256 void logInformation(String message, [CaughtException exception]) {}
255 void logInformation2(String message, Object exception) {} 257 void logInformation2(String message, Object exception) {}
256 } 258 }
OLDNEW
« no previous file with comments | « test/codegen/node_modules.dart ('k') | tool/input_sdk/lib/html/ddc/html_ddc.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698