| OLD | NEW | 
|---|
| 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  Loading... | 
| 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  Loading... | 
| 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 } | 
| OLD | NEW | 
|---|