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

Side by Side Diff: test/codegen_test.dart

Issue 1013653004: Suppress generation of JsGlobal and JsType code and use window as the default value instead of {} f… (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Created 5 years, 9 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
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';
11 import 'package:cli_util/cli_util.dart' show getSdkDir; 11 import 'package:cli_util/cli_util.dart' show getSdkDir;
12 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine, Logger; 12 import 'package:analyzer/src/generated/engine.dart' show AnalysisEngine, Logger;
13 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException; 13 import 'package:analyzer/src/generated/java_engine.dart' show CaughtException;
14 import 'package:args/args.dart'; 14 import 'package:args/args.dart';
15 import 'package:cli_util/cli_util.dart' show getSdkDir; 15 import 'package:cli_util/cli_util.dart' show getSdkDir;
16 import 'package:dev_compiler/devc.dart'; 16 import 'package:dev_compiler/devc.dart';
17 import 'package:dev_compiler/src/options.dart'; 17 import 'package:dev_compiler/src/options.dart';
18 import 'package:logging/logging.dart' show Level; 18 import 'package:logging/logging.dart' show Level;
19 import 'package:path/path.dart' as path; 19 import 'package:path/path.dart' as path;
20 import 'package:unittest/unittest.dart'; 20 import 'package:unittest/unittest.dart';
21 21
22 final ArgParser argParser = new ArgParser() 22 final ArgParser argParser = new ArgParser()
23 ..addOption('dart-sdk', help: 'Dart SDK Path', defaultsTo: null) 23 ..addOption('dart-sdk', help: 'Dart SDK Path', defaultsTo: null)
24 ..addFlag('dart-gen', 24 ..addFlag(
25 abbr: 'd', help: 'Generate dart output', defaultsTo: false); 25 'dart-gen', abbr: 'd', help: 'Generate dart output', defaultsTo: false);
26 26
27 main(arguments) { 27 main(arguments) {
28 if (arguments == null) arguments = []; 28 if (arguments == null) arguments = [];
29 ArgResults args = argParser.parse(arguments); 29 ArgResults args = argParser.parse(arguments);
30 var script = Platform.script.path; 30 var script = Platform.script.path;
31 var dartGen = args['dart-gen']; 31 var dartGen = args['dart-gen'];
32 var filePattern = new RegExp(args.rest.length > 0 ? args.rest[0] : '.'); 32 var filePattern = new RegExp(args.rest.length > 0 ? args.rest[0] : '.');
33 var compilerMessages = new StringBuffer(); 33 var compilerMessages = new StringBuffer();
34 var loggerSub; 34 var loggerSub;
35 35
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 print('[AnalysisEngine] error $message $exception'); 218 print('[AnalysisEngine] error $message $exception');
219 } 219 }
220 220
221 @override void logError2(String message, Object exception) { 221 @override void logError2(String message, Object exception) {
222 print('[AnalysisEngine] error $message $exception'); 222 print('[AnalysisEngine] error $message $exception');
223 } 223 }
224 224
225 void logInformation(String message, [CaughtException exception]) {} 225 void logInformation(String message, [CaughtException exception]) {}
226 void logInformation2(String message, Object exception) {} 226 void logInformation2(String message, Object exception) {}
227 } 227 }
OLDNEW
« test/codegen/expect/dom.js ('K') | « test/codegen/expect/server_mode/html_input.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698