Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 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. | |
| 7 | |
| 8 library analysis_server.test.server_options; | |
| 9 | |
| 10 import 'package:analysis_server/src/server_options.dart'; | |
| 11 import 'package:unittest/unittest.dart'; | |
| 12 | |
| 13 void main() { | |
| 14 groupSep = ' | '; | |
| 15 | |
| 16 group('server_options', () { | |
| 17 test('basic - []', () { | |
| 18 var options = new ServerOptions.fromContents('''# ignored | |
| 19 foo: bar | |
| 20 baz: padded | |
| 21 '''); | |
| 22 expect(options['foo'], equals('bar')); | |
| 23 expect(options['baz'], equals('padded')); | |
| 24 }); | |
| 25 test('basic - isSet', () { | |
| 26 var options = new ServerOptions.fromContents('''foo: true | |
| 27 bar: TRUE | |
| 28 baz: false | |
| 29 foobar: off | |
| 30 '''); | |
| 31 expect(options.isSet('foo'), isTrue); | |
| 32 expect(options.isSet('bar'), isTrue); | |
| 33 expect(options.isSet('baz'), isFalse); | |
| 34 expect(options.isSet('foobar'), isFalse); | |
|
scheglov
2015/07/30 18:04:10
Test for not existing option?
pquitslund
2015/07/30 19:55:48
Done.
| |
| 35 }); | |
|
scheglov
2015/07/30 18:04:10
Test for getStringValue()?
pquitslund
2015/07/30 19:55:48
Done.
| |
| 36 }); | |
| 37 } | |
| OLD | NEW |