Files
sdk/tests/language_2/bool/has_environment_test.dart
T
Erik Ernst 330ec173a9 Add bool.hasEnvironment constructor and tests
Change-Id: I65ebfcb48bf46292d5ae611ecb7431e0666f753c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139286
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-16 11:17:58 +00:00

16 lines
571 B
Dart

// Copyright (c) 2020, 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= -Db=b -Dc=Something
import 'package:expect/expect.dart';
main() {
Expect.isTrue(const bool.hasEnvironment('dart.library.core'));
Expect.isTrue(const bool.hasEnvironment('a'));
Expect.isTrue(const bool.hasEnvironment('b'));
Expect.isTrue(const bool.hasEnvironment('c'));
Expect.isFalse(const bool.hasEnvironment('d'));
}