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

Side by Side Diff: pkg/dev_compiler/test/options/options_test.dart

Issue 2955513002: Dynamically load packages for dartdevc tests in test.dart. (Closed)
Patch Set: Remove TODO that's TODONE. Created 3 years, 5 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 | « pkg/dev_compiler/lib/src/compiler/compiler.dart ('k') | pkg/dev_compiler/tool/build_pkgs.dart » ('j') | 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 import 'dart:io'; 5 import 'dart:io';
6 import 'package:analyzer/analyzer.dart'; 6 import 'package:analyzer/analyzer.dart';
7 import 'package:analyzer/src/command_line/arguments.dart'; 7 import 'package:analyzer/src/command_line/arguments.dart';
8 import 'package:analyzer/src/summary/summary_sdk.dart'; 8 import 'package:analyzer/src/summary/summary_sdk.dart';
9 import 'package:path/path.dart' as path; 9 import 'package:path/path.dart' as path;
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 test('fromArgs options flag', () { 72 test('fromArgs options flag', () {
73 var args = <String>['--$enableStrictCallChecksFlag']; 73 var args = <String>['--$enableStrictCallChecksFlag'];
74 //TODO(danrubel) remove sdkSummaryArgs once all SDKs have summary file 74 //TODO(danrubel) remove sdkSummaryArgs once all SDKs have summary file
75 args.addAll(sdkSummaryArgs); 75 args.addAll(sdkSummaryArgs);
76 var argResults = ddcArgParser().parse(args); 76 var argResults = ddcArgParser().parse(args);
77 var options = new AnalyzerOptions.fromArguments(argResults); 77 var options = new AnalyzerOptions.fromArguments(argResults);
78 var compiler = new ModuleCompiler(options, analysisRoot: optionsDir); 78 var compiler = new ModuleCompiler(options, analysisRoot: optionsDir);
79 var analysisOptions = compiler.context.analysisOptions; 79 var analysisOptions = compiler.context.analysisOptions;
80 expect(analysisOptions.enableStrictCallChecks, isTrue); 80 expect(analysisOptions.enableStrictCallChecks, isTrue);
81 }); 81 });
82
83 test('custom module name for summary', () {
84 var args = <String>[
85 '-snormal',
86 '-scustom/path:module',
87 '-sanother',
88 '-scustom/path2:module2'
89 ];
90
91 var argResults = ddcArgParser().parse(args);
92 var options = new AnalyzerOptions.fromArguments(argResults);
93 expect(options.summaryPaths,
94 orderedEquals(['normal', 'custom/path', 'another', 'custom/path2']));
95 expect(options.customSummaryModules['custom/path'], equals('module'));
96 expect(options.customSummaryModules['custom/path2'], equals('module2'));
97 expect(options.customSummaryModules.containsKey('normal'), isFalse);
98 });
82 } 99 }
OLDNEW
« no previous file with comments | « pkg/dev_compiler/lib/src/compiler/compiler.dart ('k') | pkg/dev_compiler/tool/build_pkgs.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698