dart-sdk/tests/corelib/bool_from_environment_test.dart
Joshua Litt 84c695a38d Reland "[test] Fix some tests for Dart2Wasm."
This CL cleans up the logic in two tests to better prepare for Dart2Wasm. In addition, env_test has been cleaned up now that the multitest no longer makes sense.

Change-Id: I0a7eabff1e2bfb6ea7aa1078ee85a58db9886e21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267286
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-11-04 16:10:39 +00:00

17 lines
752 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=true -Db=false -Dc=NOTBOOL -Dd=True
import "package:expect/expect.dart";
import 'package:expect/config.dart';
main() {
Expect.isTrue(const bool.fromEnvironment('a'));
Expect.isFalse(const bool.fromEnvironment('b'));
Expect.isTrue(const bool.fromEnvironment('c', defaultValue: true));
Expect.isFalse(const bool.fromEnvironment('c', defaultValue: false));
Expect.isFalse(const bool.fromEnvironment('d', defaultValue: false));
Expect.equals(const bool.fromEnvironment('dart.isVM'), isVmConfiguration);
}