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

Side by Side Diff: test/codegen_test.dart

Issue 1945153002: Add corelib tests (Closed) Base URL: https://github.com/dart-lang/dev_compiler@master
Patch Set: error_test and range_error_test now pass 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
« no previous file with comments | « test/codegen/corelib/uri_test.dart ('k') | no next file » | 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) 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 22 matching lines...) Expand all
33 ..addOption('dart-sdk', help: 'Dart SDK Path', defaultsTo: null); 33 ..addOption('dart-sdk', help: 'Dart SDK Path', defaultsTo: null);
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 path.join('lib', 'typed_data'), 44 path.join('lib', 'typed_data'),
44 path.join('lib', 'html') 45 path.join('lib', 'html')
45 ]; 46 ];
46 47
47 var multitests = expandMultiTests(testDirs, filePattern); 48 var multitests = expandMultiTests(testDirs, filePattern);
48 49
49 // Build packages tests depend on 50 // Build packages tests depend on
50 var compiler = new ModuleCompiler( 51 var compiler = new ModuleCompiler(
51 new AnalyzerOptions(customUrlMappings: packageUrlMappings)); 52 new AnalyzerOptions(customUrlMappings: packageUrlMappings));
52 53
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 /// Simplified from ParseDartTask.resolveDirective. 293 /// Simplified from ParseDartTask.resolveDirective.
293 String _resolveDirective(UriBasedDirective directive) { 294 String _resolveDirective(UriBasedDirective directive) {
294 StringLiteral uriLiteral = directive.uri; 295 StringLiteral uriLiteral = directive.uri;
295 String uriContent = uriLiteral.stringValue; 296 String uriContent = uriLiteral.stringValue;
296 if (uriContent != null) { 297 if (uriContent != null) {
297 uriContent = uriContent.trim(); 298 uriContent = uriContent.trim();
298 directive.uriContent = uriContent; 299 directive.uriContent = uriContent;
299 } 300 }
300 return directive.validate() == null ? uriContent : null; 301 return directive.validate() == null ? uriContent : null;
301 } 302 }
OLDNEW
« no previous file with comments | « test/codegen/corelib/uri_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698