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 | 78 |
79 // Build packages tests depend on. | 79 // Build packages tests depend on. |
80 _buildAllPackages(compiler); | 80 _buildAllPackages(compiler); |
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', 'typed_data') | 88 path.join('lib', 'typed_data'), |
89 ]; | 89 ]; |
90 | 90 |
91 // Copy all of the test files and expanded multitest files to | 91 // Copy all of the test files and expanded multitest files to |
92 // gen/codegen_tests. We'll compile from there. | 92 // gen/codegen_tests. We'll compile from there. |
93 var testFiles = _setUpTests(testDirs, filePattern); | 93 var testFiles = _setUpTests(testDirs, filePattern); |
94 | 94 |
95 // Our default compiler options. Individual tests can override these. | 95 // Our default compiler options. Individual tests can override these. |
96 var defaultOptions = ['--no-source-map', '--no-summarize']; | 96 var defaultOptions = ['--no-source-map', '--no-summarize']; |
97 var compilerArgParser = CompilerOptions.addArguments(new ArgParser()); | 97 var compilerArgParser = CompilerOptions.addArguments(new ArgParser()); |
98 | 98 |
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 /// Simplified from ParseDartTask.resolveDirective. | 383 /// Simplified from ParseDartTask.resolveDirective. |
384 String _resolveDirective(UriBasedDirective directive) { | 384 String _resolveDirective(UriBasedDirective directive) { |
385 StringLiteral uriLiteral = directive.uri; | 385 StringLiteral uriLiteral = directive.uri; |
386 String uriContent = uriLiteral.stringValue; | 386 String uriContent = uriLiteral.stringValue; |
387 if (uriContent != null) { | 387 if (uriContent != null) { |
388 uriContent = uriContent.trim(); | 388 uriContent = uriContent.trim(); |
389 directive.uriContent = uriContent; | 389 directive.uriContent = uriContent; |
390 } | 390 } |
391 return directive.validate() == null ? uriContent : null; | 391 return directive.validate() == null ? uriContent : null; |
392 } | 392 } |
OLD | NEW |