dart-sdk/tests/corelib/int_from_environment2_test.dart
Erik Ernst 568255dbec Change tests to expect new behavior of fromEnvironment
Constructors int.fromEnvironment and String.fromEnvironment will now
yield 0 or '' rather than null in the case where the requested
environment declaration does not exist, so various expectations needed
to be updated accordingly.

Change-Id: Ie6f3b9ee18a970e50520ac84c2741b4875ada3c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139804
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-17 13:43:17 +00:00

14 lines
574 B
Dart

// 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.
// SharedOptions=-Da=x -Db=- -Dc=0xg -Dd=+ -Dd=
import "package:expect/expect.dart";
main() {
Expect.equals(0, const int.fromEnvironment('a'));
Expect.equals(0, const int.fromEnvironment('b'));
Expect.equals(0, const int.fromEnvironment('c'));
Expect.equals(0, const int.fromEnvironment('d'));
Expect.equals(0, const int.fromEnvironment('e'));
}