Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(964)

Unified Diff: pkg/analysis_server/test/server_options_test.dart

Issue 1270593002: Server options handling. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/server_options_test.dart
diff --git a/pkg/analysis_server/test/server_options_test.dart b/pkg/analysis_server/test/server_options_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..cda409d4a9e36da91c0b137b25485f14c17884fa
--- /dev/null
+++ b/pkg/analysis_server/test/server_options_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This code was auto-generated, is not intended to be edited, and is subject to
+// significant change. Please see the README file for more information.
+
+library analysis_server.test.server_options;
+
+import 'package:analysis_server/src/server_options.dart';
+import 'package:unittest/unittest.dart';
+
+void main() {
+ groupSep = ' | ';
+
+ group('server_options', () {
+ test('basic - []', () {
+ var options = new ServerOptions.fromContents('''# ignored
+foo: bar
+baz: padded
+''');
+ expect(options['foo'], equals('bar'));
+ expect(options['baz'], equals('padded'));
+ });
+ test('basic - isSet', () {
+ var options = new ServerOptions.fromContents('''foo: true
+bar: TRUE
+baz: false
+foobar: off
+''');
+ expect(options.isSet('foo'), isTrue);
+ expect(options.isSet('bar'), isTrue);
+ expect(options.isSet('baz'), isFalse);
+ 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.
+ });
scheglov 2015/07/30 18:04:10 Test for getStringValue()?
pquitslund 2015/07/30 19:55:48 Done.
+ });
+}

Powered by Google App Engine
This is Rietveld 408576698