| 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 // This code was auto-generated, is not intended to be edited, and is subject to | 5 // This code was auto-generated, is not intended to be edited, and is subject to |
| 6 // significant change. Please see the README file for more information. | 6 // significant change. Please see the README file for more information. |
| 7 | 7 |
| 8 library analysis_server.test.server_options; | 8 library analysis_server.test.server_options; |
| 9 | 9 |
| 10 import 'package:analysis_server/src/server_options.dart'; | 10 import 'package:analysis_server/src/server_options.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 var options = new ServerOptions.fromContents('''foo: true | 26 var options = new ServerOptions.fromContents('''foo: true |
| 27 bar: TRUE | 27 bar: TRUE |
| 28 baz: false | 28 baz: false |
| 29 foobar: off | 29 foobar: off |
| 30 '''); | 30 '''); |
| 31 expect(options.isSet('foo'), isTrue); | 31 expect(options.isSet('foo'), isTrue); |
| 32 expect(options.isSet('bar'), isTrue); | 32 expect(options.isSet('bar'), isTrue); |
| 33 expect(options.isSet('baz'), isFalse); | 33 expect(options.isSet('baz'), isFalse); |
| 34 expect(options.isSet('foobar'), isFalse); | 34 expect(options.isSet('foobar'), isFalse); |
| 35 expect(options.isSet('does_not_exist'), isFalse); | 35 expect(options.isSet('does_not_exist'), isFalse); |
| 36 expect(options.isSet('does_not_exist', defaultValue: true), isTrue); |
| 36 }); | 37 }); |
| 37 | 38 |
| 38 test('basic - getStringValue', () { | 39 test('basic - getStringValue', () { |
| 39 var options = new ServerOptions.fromContents('''foo: someValue | 40 var options = new ServerOptions.fromContents('''foo: someValue |
| 40 '''); | 41 '''); |
| 41 expect(options.getStringValue('foo'), equals('someValue')); | 42 expect(options.getStringValue('foo'), equals('someValue')); |
| 42 expect(options.getStringValue('not_there'), isNull); | 43 expect(options.getStringValue('not_there'), isNull); |
| 43 expect(options.getStringValue('not_there', defaultValue: 'bar'), | 44 expect(options.getStringValue('not_there', defaultValue: 'bar'), |
| 44 equals('bar')); | 45 equals('bar')); |
| 45 }); | 46 }); |
| 46 }); | 47 }); |
| 47 } | 48 } |
| OLD | NEW |