| OLD | NEW |
| 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/test.dart'; |
| 12 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 13 import 'package:test_reflective_loader/test_reflective_loader.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.buildMode, isFalse); | 22 expect(options.buildMode, isFalse); |
| 23 expect(options.buildAnalysisOutput, isNull); | 23 expect(options.buildAnalysisOutput, isNull); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 'package:p/foo.dart|/path/to/p/lib/foo.dart' | 352 'package:p/foo.dart|/path/to/p/lib/foo.dart' |
| 353 ]); | 353 ]); |
| 354 expect(options.buildMode, isTrue); | 354 expect(options.buildMode, isTrue); |
| 355 expect(options.buildSuppressExitCode, isTrue); | 355 expect(options.buildSuppressExitCode, isTrue); |
| 356 } | 356 } |
| 357 | 357 |
| 358 void _parse(List<String> args) { | 358 void _parse(List<String> args) { |
| 359 options = CommandLineOptions.parse(args); | 359 options = CommandLineOptions.parse(args); |
| 360 } | 360 } |
| 361 } | 361 } |
| OLD | NEW |