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

Unified Diff: pkg/analyzer_cli/test/options_test.dart

Issue 2578733002: move CommandLineParser into analyzer for reuse by DDC (Closed)
Patch Set: merge Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/options_test.dart
diff --git a/pkg/analyzer_cli/test/options_test.dart b/pkg/analyzer_cli/test/options_test.dart
index 35a1d4f14019cf3fa840501773ef123e180ee9f4..c0ca301e3a07695560dff70238ed27b4a9f6058d 100644
--- a/pkg/analyzer_cli/test/options_test.dart
+++ b/pkg/analyzer_cli/test/options_test.dart
@@ -8,7 +8,6 @@ import 'dart:io';
import 'package:analyzer_cli/src/driver.dart';
import 'package:analyzer_cli/src/options.dart';
-import 'package:args/args.dart';
import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -152,12 +151,6 @@ main() {
expect(options.warningsAreFatal, isTrue);
});
- test('notice unrecognized flags', () {
- expect(
- () => new CommandLineParser().parse(['--bar', '--baz', 'foo.dart']),
- throwsA(new isInstanceOf<FormatException>()));
- });
-
test('ignore unrecognized flags', () {
CommandLineOptions options = CommandLineOptions.parse([
'--ignore-unrecognized-flags',
@@ -171,17 +164,6 @@ main() {
expect(options.sourceFiles, equals(['foo.dart']));
});
- test('ignore unrecognized options', () {
- CommandLineParser parser =
- new CommandLineParser(alwaysIgnoreUnrecognized: true);
- parser.addOption('optionA');
- parser.addFlag('flagA');
- ArgResults argResults =
- parser.parse(['--optionA=1', '--optionB=2', '--flagA']);
- expect(argResults['optionA'], '1');
- expect(argResults['flagA'], isTrue);
- });
-
test('strong mode', () {
CommandLineOptions options =
CommandLineOptions.parse(['--strong', 'foo.dart']);
« 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