| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 options_test; | 5 library options_test; |
| 6 | 6 |
| 7 import 'package:unittest/unittest.dart'; | 7 import 'package:unittest/unittest.dart'; |
| 8 import 'package:analyzer/options.dart'; | 8 import 'package:analyzer/options.dart'; |
| 9 | 9 |
| 10 main() { | 10 main() { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 }); | 54 }); |
| 55 | 55 |
| 56 test('enable enum', () { | 56 test('enable enum', () { |
| 57 CommandLineOptions options = CommandLineOptions | 57 CommandLineOptions options = CommandLineOptions |
| 58 .parse(['--dart-sdk', '.', '--enable-enum', 'foo.dart']); | 58 .parse(['--dart-sdk', '.', '--enable-enum', 'foo.dart']); |
| 59 expect(options.enableEnum, isTrue); | 59 expect(options.enableEnum, isTrue); |
| 60 }); | 60 }); |
| 61 | 61 |
| 62 test('enable type checks', () { | 62 test('enable type checks', () { |
| 63 CommandLineOptions options = CommandLineOptions | 63 CommandLineOptions options = CommandLineOptions |
| 64 .parse(['--dart-sdk', '.', '--enable_type_cheks', 'foo.dart']); | 64 .parse(['--dart-sdk', '.', '--enable_type_checks', 'foo.dart']); |
| 65 expect(options.enableTypeChecks, isTrue); | 65 expect(options.enableTypeChecks, isTrue); |
| 66 }); | 66 }); |
| 67 | 67 |
| 68 test('log', () { | 68 test('log', () { |
| 69 CommandLineOptions options = CommandLineOptions | 69 CommandLineOptions options = CommandLineOptions |
| 70 .parse(['--dart-sdk', '.', '--log', 'foo.dart']); | 70 .parse(['--dart-sdk', '.', '--log', 'foo.dart']); |
| 71 expect(options.log, isTrue); | 71 expect(options.log, isTrue); |
| 72 }); | 72 }); |
| 73 | 73 |
| 74 test('machine format', () { | 74 test('machine format', () { |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 // test('ignore unrecognized flags', () { | 128 // test('ignore unrecognized flags', () { |
| 129 // CommandLineOptions options = new CommandLineOptions.parse([ | 129 // CommandLineOptions options = new CommandLineOptions.parse([ |
| 130 // '--ignore_unrecognized_flags', '--bar', '--baz', 'foo.dart']); | 130 // '--ignore_unrecognized_flags', '--bar', '--baz', 'foo.dart']); |
| 131 // expect(options, isNotNull); | 131 // expect(options, isNotNull); |
| 132 // expect(options.sourceFiles, equals(['foo.dart'])); | 132 // expect(options.sourceFiles, equals(['foo.dart'])); |
| 133 // }); | 133 // }); |
| 134 | 134 |
| 135 }); | 135 }); |
| 136 | 136 |
| 137 } | 137 } |
| OLD | NEW |