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

Side by Side Diff: test/codegen_test.dart

Issue 1965563003: Update dart:convert and dart:core Uri. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 7 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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:convert' show JSON; 10 import 'dart:convert' show JSON;
(...skipping 23 matching lines...) Expand all
34 34
35 main(arguments) { 35 main(arguments) {
36 if (arguments == null) arguments = []; 36 if (arguments == null) arguments = [];
37 ArgResults args = argParser.parse(arguments); 37 ArgResults args = argParser.parse(arguments);
38 var filePattern = new RegExp(args.rest.length > 0 ? args.rest[0] : '.'); 38 var filePattern = new RegExp(args.rest.length > 0 ? args.rest[0] : '.');
39 39
40 var expectDir = path.join(inputDir, 'expect'); 40 var expectDir = path.join(inputDir, 'expect');
41 var testDirs = [ 41 var testDirs = [
42 'language', 42 'language',
43 'corelib', 43 'corelib',
44 path.join('lib', 'typed_data'), 44 path.join('lib', 'convert'),
45 path.join('lib', 'html') 45 path.join('lib', 'html'),
46 path.join('lib', 'typed_data')
46 ]; 47 ];
47 48
48 var multitests = expandMultiTests(testDirs, filePattern); 49 var multitests = expandMultiTests(testDirs, filePattern);
49 50
50 // Build packages tests depend on 51 // Build packages tests depend on
51 var compiler = new ModuleCompiler( 52 var compiler = new ModuleCompiler(
52 new AnalyzerOptions(customUrlMappings: packageUrlMappings)); 53 new AnalyzerOptions(customUrlMappings: packageUrlMappings));
53 54
54 group('dartdevc package', () { 55 group('dartdevc package', () {
55 _buildPackages(compiler, expectDir); 56 _buildPackages(compiler, expectDir);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 /// Simplified from ParseDartTask.resolveDirective. 305 /// Simplified from ParseDartTask.resolveDirective.
305 String _resolveDirective(UriBasedDirective directive) { 306 String _resolveDirective(UriBasedDirective directive) {
306 StringLiteral uriLiteral = directive.uri; 307 StringLiteral uriLiteral = directive.uri;
307 String uriContent = uriLiteral.stringValue; 308 String uriContent = uriLiteral.stringValue;
308 if (uriContent != null) { 309 if (uriContent != null) {
309 uriContent = uriContent.trim(); 310 uriContent = uriContent.trim();
310 directive.uriContent = uriContent; 311 directive.uriContent = uriContent;
311 } 312 }
312 return directive.validate() == null ? uriContent : null; 313 return directive.validate() == null ? uriContent : null;
313 } 314 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698