| Index: pkg/analyzer/test/options_test.dart
|
| diff --git a/pkg/analyzer/test/options_test.dart b/pkg/analyzer/test/options_test.dart
|
| index 6dde78b7f73ffd6e9899f55f014d9f8cdcda31f8..b9fdfa2c885e53e2ebfafdd2fe5fca9917d77468 100644
|
| --- a/pkg/analyzer/test/options_test.dart
|
| +++ b/pkg/analyzer/test/options_test.dart
|
| @@ -17,24 +17,40 @@ main() {
|
| expect(options, isNotNull);
|
| expect(options.shouldBatch, isFalse);
|
| expect(options.machineFormat, isFalse);
|
| + expect(options.displayVersion, isFalse);
|
| + expect(options.disableHints, isFalse);
|
| expect(options.ignoreUnrecognizedFlags, isFalse);
|
| + expect(options.perf, isFalse);
|
| expect(options.showPackageWarnings, isFalse);
|
| expect(options.showSdkWarnings, isFalse);
|
| expect(options.warningsAreFatal, isFalse);
|
| expect(options.dartSdkPath, isNotNull);
|
| + expect(options.log, isFalse);
|
| expect(options.sourceFiles, equals(['foo.dart']));
|
| });
|
|
|
| + test('batch', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '--batch']);
|
| + expect(options.shouldBatch, isTrue);
|
| + });
|
| +
|
| test('machine format', () {
|
| CommandLineOptions options = CommandLineOptions
|
| .parse(['--dart-sdk', '.', '--format=machine', 'foo.dart']);
|
| expect(options.machineFormat, isTrue);
|
| });
|
|
|
| - test('package root', () {
|
| + test('no-hints', () {
|
| CommandLineOptions options = CommandLineOptions
|
| - .parse(['--dart-sdk', '.', '-p', 'bar', 'foo.dart']);
|
| - expect(options.packageRootPath, equals('bar'));
|
| + .parse(['--dart-sdk', '.', '--no-hints', 'foo.dart']);
|
| + expect(options.disableHints, isTrue);
|
| + });
|
| +
|
| + test('perf', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '--perf', 'foo.dart']);
|
| + expect(options.perf, isTrue);
|
| });
|
|
|
| test('package warnings', () {
|
| @@ -49,6 +65,30 @@ main() {
|
| expect(options.showSdkWarnings, isTrue);
|
| });
|
|
|
| + test('warningsAreFatal', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '--fatal-warnings', 'foo.dart']);
|
| + expect(options.warningsAreFatal, isTrue);
|
| + });
|
| +
|
| + test('package root', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '-p', 'bar', 'foo.dart']);
|
| + expect(options.packageRootPath, equals('bar'));
|
| + });
|
| +
|
| + test('log', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '--log', 'foo.dart']);
|
| + expect(options.log, isTrue);
|
| + });
|
| +
|
| + test('sourceFiles', () {
|
| + CommandLineOptions options = CommandLineOptions
|
| + .parse(['--dart-sdk', '.', '--log', 'foo.dart', 'foo2.dart', 'foo3.dart']);
|
| + expect(options.sourceFiles, equals(['foo.dart', 'foo2.dart', 'foo3.dart']));
|
| + });
|
| +
|
| // test('notice unrecognized flags', () {
|
| // CommandLineOptions options = new CommandLineOptions.parse(['--bar', '--baz',
|
| // 'foo.dart']);
|
| @@ -65,4 +105,3 @@ main() {
|
| });
|
|
|
| }
|
| -
|
|
|