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

Side by Side Diff: pkg/analyzer_cli/test/options_test.dart

Issue 1778683004: CLI support for `enableConditionalDirectives`. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: typos Created 4 years, 9 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/analyzer_cli/lib/src/options.dart ('k') | no next file » | 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library analyzer_cli.test.options; 5 library analyzer_cli.test.options;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 8
9 import 'package:analyzer_cli/src/driver.dart'; 9 import 'package:analyzer_cli/src/driver.dart';
10 import 'package:analyzer_cli/src/options.dart'; 10 import 'package:analyzer_cli/src/options.dart';
11 import 'package:args/args.dart'; 11 import 'package:args/args.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
14 14
15 main() { 15 main() {
16 group('CommandLineOptions', () { 16 group('CommandLineOptions', () {
17 group('parse', () { 17 group('parse', () {
18 test('defaults', () { 18 test('defaults', () {
19 CommandLineOptions options = 19 CommandLineOptions options =
20 CommandLineOptions.parse(['--dart-sdk', '.', 'foo.dart']); 20 CommandLineOptions.parse(['--dart-sdk', '.', 'foo.dart']);
21 expect(options, isNotNull); 21 expect(options, isNotNull);
22 expect(options.dartSdkPath, isNotNull); 22 expect(options.dartSdkPath, isNotNull);
23 expect(options.disableHints, isFalse); 23 expect(options.disableHints, isFalse);
24 expect(options.lints, isFalse); 24 expect(options.lints, isFalse);
25 expect(options.displayVersion, isFalse); 25 expect(options.displayVersion, isFalse);
26 expect(options.enableStrictCallChecks, isFalse); 26 expect(options.enableStrictCallChecks, isFalse);
27 expect(options.enableSuperMixins, isFalse); 27 expect(options.enableSuperMixins, isFalse);
28 expect(options.enableConditionalDirectives, isFalse);
Brian Wilkerson 2016/03/09 03:31:10 Maybe a test showing that it's true when the flag
pquitslund 2016/03/09 18:04:31 Done.
28 expect(options.enableTypeChecks, isFalse); 29 expect(options.enableTypeChecks, isFalse);
29 expect(options.hintsAreFatal, isFalse); 30 expect(options.hintsAreFatal, isFalse);
30 expect(options.ignoreUnrecognizedFlags, isFalse); 31 expect(options.ignoreUnrecognizedFlags, isFalse);
31 expect(options.log, isFalse); 32 expect(options.log, isFalse);
32 expect(options.machineFormat, isFalse); 33 expect(options.machineFormat, isFalse);
33 expect(options.packageMode, isFalse); 34 expect(options.packageMode, isFalse);
34 expect(options.packageRootPath, isNull); 35 expect(options.packageRootPath, isNull);
35 expect(options.packageSummaryInputs, isEmpty); 36 expect(options.packageSummaryInputs, isEmpty);
36 expect(options.shouldBatch, isFalse); 37 expect(options.shouldBatch, isFalse);
37 expect(options.showPackageWarnings, isFalse); 38 expect(options.showPackageWarnings, isFalse);
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
268 '/path/to/pkg' 269 '/path/to/pkg'
269 ]); 270 ]);
270 expect(options.packageMode, isTrue); 271 expect(options.packageMode, isTrue);
271 expect(options.packageSummaryOutput, '/path/to/output.sum'); 272 expect(options.packageSummaryOutput, '/path/to/output.sum');
272 } 273 }
273 274
274 void _parse(List<String> args) { 275 void _parse(List<String> args) {
275 options = CommandLineOptions.parse(args); 276 options = CommandLineOptions.parse(args);
276 } 277 }
277 } 278 }
OLDNEW
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698