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

Side by Side Diff: pkg/dev_compiler/test/codegen_test.dart

Issue 2598593003: support --options flag and other analysis options flags in DDC (Closed)
Patch Set: merge Created 3 years, 11 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 /// 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 var sdkDir = path.join(repoDirectory, 'gen', 'patched_sdk'); 72 var sdkDir = path.join(repoDirectory, 'gen', 'patched_sdk');
73 var sdkSummaryFile = 73 var sdkSummaryFile =
74 path.join(testDirectory, '..', 'lib', 'sdk', 'ddc_sdk.sum'); 74 path.join(testDirectory, '..', 'lib', 'sdk', 'ddc_sdk.sum');
75 75
76 var summaryPaths = new Directory(path.join(codegenOutputDir, 'pkg')) 76 var summaryPaths = new Directory(path.join(codegenOutputDir, 'pkg'))
77 .listSync() 77 .listSync()
78 .map((e) => e.path) 78 .map((e) => e.path)
79 .where((p) => p.endsWith('.sum')) 79 .where((p) => p.endsWith('.sum'))
80 .toList(); 80 .toList();
81 81
82 var sharedCompiler = new ModuleCompiler(new AnalyzerOptions.basic( 82 var sharedCompiler = new ModuleCompiler(
83 dartSdkSummaryPath: sdkSummaryFile, summaryPaths: summaryPaths)); 83 new AnalyzerOptions.basic(
84 dartSdkSummaryPath: sdkSummaryFile, summaryPaths: summaryPaths));
84 85
85 var testDirs = [ 86 var testDirs = [
86 'language', 87 'language',
87 'corelib', 88 'corelib',
88 path.join('corelib', 'regexp'), 89 path.join('corelib', 'regexp'),
89 path.join('lib', 'collection'), 90 path.join('lib', 'collection'),
90 path.join('lib', 'convert'), 91 path.join('lib', 'convert'),
91 path.join('lib', 'html'), 92 path.join('lib', 'html'),
92 // TODO(vsm): Fix these - they import files from a different directory 93 // TODO(vsm): Fix these - they import files from a different directory
93 // - this triggers an invalid library root build error. 94 // - this triggers an invalid library root build error.
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 StringLiteral uriLiteral = directive.uri; 359 StringLiteral uriLiteral = directive.uri;
359 String uriContent = uriLiteral.stringValue; 360 String uriContent = uriLiteral.stringValue;
360 if (uriContent != null) { 361 if (uriContent != null) {
361 uriContent = uriContent.trim(); 362 uriContent = uriContent.trim();
362 directive.uriContent = uriContent; 363 directive.uriContent = uriContent;
363 } 364 }
364 return (directive as UriBasedDirectiveImpl).validate() == null 365 return (directive as UriBasedDirectiveImpl).validate() == null
365 ? uriContent 366 ? uriContent
366 : null; 367 : null;
367 } 368 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/test/all_tests.dart ('k') | pkg/dev_compiler/test/options/analysis_options.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698