| 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 /// | 6 /// |
| 7 /// Runs Dart Dev Compiler on all input in the `codegen` directory and checks | 7 /// Runs Dart Dev Compiler on all input in the `codegen` directory and checks |
| 8 /// that the output is what we expected. | 8 /// that the output is what we expected. |
| 9 library dev_compiler.test.codegen_test; | 9 library dev_compiler.test.codegen_test; |
| 10 | 10 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 var analyzerOptions = new AnalyzerOptions( | 78 var analyzerOptions = new AnalyzerOptions( |
| 79 dartSdkSummaryPath: sdkSummaryFile, summaryPaths: summaryPaths); | 79 dartSdkSummaryPath: sdkSummaryFile, summaryPaths: summaryPaths); |
| 80 var compiler = new ModuleCompiler(analyzerOptions); | 80 var compiler = new ModuleCompiler(analyzerOptions); |
| 81 | 81 |
| 82 var testDirs = [ | 82 var testDirs = [ |
| 83 'language', | 83 'language', |
| 84 'corelib', | 84 'corelib', |
| 85 path.join('lib', 'convert'), | 85 path.join('lib', 'convert'), |
| 86 path.join('lib', 'html'), | 86 path.join('lib', 'html'), |
| 87 path.join('lib', 'math'), | 87 path.join('lib', 'math'), |
| 88 path.join('lib', 'mirrors'), |
| 88 path.join('lib', 'typed_data'), | 89 path.join('lib', 'typed_data'), |
| 89 ]; | 90 ]; |
| 90 | 91 |
| 91 // Copy all of the test files and expanded multitest files to | 92 // Copy all of the test files and expanded multitest files to |
| 92 // gen/codegen_tests. We'll compile from there. | 93 // gen/codegen_tests. We'll compile from there. |
| 93 var testFiles = _setUpTests(testDirs); | 94 var testFiles = _setUpTests(testDirs); |
| 94 | 95 |
| 95 // Our default compiler options. Individual tests can override these. | 96 // Our default compiler options. Individual tests can override these. |
| 96 var defaultOptions = ['--no-source-map', '--no-summarize']; | 97 var defaultOptions = ['--no-source-map', '--no-summarize']; |
| 97 var compilerArgParser = new ArgParser(); | 98 var compilerArgParser = new ArgParser(); |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 342 /// Simplified from ParseDartTask.resolveDirective. | 343 /// Simplified from ParseDartTask.resolveDirective. |
| 343 String _resolveDirective(UriBasedDirective directive) { | 344 String _resolveDirective(UriBasedDirective directive) { |
| 344 StringLiteral uriLiteral = directive.uri; | 345 StringLiteral uriLiteral = directive.uri; |
| 345 String uriContent = uriLiteral.stringValue; | 346 String uriContent = uriLiteral.stringValue; |
| 346 if (uriContent != null) { | 347 if (uriContent != null) { |
| 347 uriContent = uriContent.trim(); | 348 uriContent = uriContent.trim(); |
| 348 directive.uriContent = uriContent; | 349 directive.uriContent = uriContent; |
| 349 } | 350 } |
| 350 return directive.validate() == null ? uriContent : null; | 351 return directive.validate() == null ? uriContent : null; |
| 351 } | 352 } |
| OLD | NEW |