Index: tests/corelib/bool_from_environment_default_value_test.dart |
diff --git a/tests/corelib/bool_from_environment_default_value_test.dart b/tests/corelib/bool_from_environment_default_value_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..82acf265a02706f223b871cec972d5d3df45f495 |
--- /dev/null |
+++ b/tests/corelib/bool_from_environment_default_value_test.dart |
@@ -0,0 +1,12 @@ |
+// Copyright (c) 2013, 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. |
+ |
+import "package:expect/expect.dart"; |
+ |
+main() { |
+ Expect.isNull(const bool.fromEnvironment('NOT_FOUND')); |
+ Expect.isTrue(const bool.fromEnvironment('NOT_FOUND', defaultValue: true)); |
+ Expect.isFalse(const bool.fromEnvironment('NOT_FOUND', defaultValue: false)); |
+ Expect.isNull(const bool.fromEnvironment('NOT_FOUND', defaultValue: null)); |
+} |