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

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

Issue 2713723003: Remove and hide analyzer cli flags. (Closed)
Patch Set: Created 3 years, 10 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) 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';
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 }); 127 });
128 128
129 test('package warnings', () { 129 test('package warnings', () {
130 CommandLineOptions options = CommandLineOptions 130 CommandLineOptions options = CommandLineOptions
131 .parse(['--dart-sdk', '.', '--package-warnings', 'foo.dart']); 131 .parse(['--dart-sdk', '.', '--package-warnings', 'foo.dart']);
132 expect(options.showPackageWarnings, isTrue); 132 expect(options.showPackageWarnings, isTrue);
133 }); 133 });
134 134
135 test('sdk warnings', () { 135 test('sdk warnings', () {
136 CommandLineOptions options = CommandLineOptions 136 CommandLineOptions options = CommandLineOptions
137 .parse(['--dart-sdk', '.', '--warnings', 'foo.dart']); 137 .parse(['--dart-sdk', '.', '--sdk-warnings', 'foo.dart']);
138 expect(options.showSdkWarnings, isTrue); 138 expect(options.showSdkWarnings, isTrue);
139 }); 139 });
140 140
141 test('sourceFiles', () { 141 test('sourceFiles', () {
142 CommandLineOptions options = CommandLineOptions.parse( 142 CommandLineOptions options = CommandLineOptions.parse(
143 ['--dart-sdk', '.', '--log', 'foo.dart', 'foo2.dart', 'foo3.dart']); 143 ['--dart-sdk', '.', '--log', 'foo.dart', 'foo2.dart', 'foo3.dart']);
144 expect(options.sourceFiles, 144 expect(options.sourceFiles,
145 equals(['foo.dart', 'foo2.dart', 'foo3.dart'])); 145 equals(['foo.dart', 'foo2.dart', 'foo3.dart']));
146 }); 146 });
147 147
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 'package:p/foo.dart|/path/to/p/lib/foo.dart' 333 'package:p/foo.dart|/path/to/p/lib/foo.dart'
334 ]); 334 ]);
335 expect(options.buildMode, isTrue); 335 expect(options.buildMode, isTrue);
336 expect(options.buildSuppressExitCode, isTrue); 336 expect(options.buildSuppressExitCode, isTrue);
337 } 337 }
338 338
339 void _parse(List<String> args) { 339 void _parse(List<String> args) {
340 options = CommandLineOptions.parse(args); 340 options = CommandLineOptions.parse(args);
341 } 341 }
342 } 342 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698