Commit Graph

6 Commits

Author SHA1 Message Date
Vyacheslav Egorov 7348441514 [tests] Fix language/bool/has_environment_not_new
This test always fails on the VM because unlike other
targets VM allows to invoke this constructor with `new`.

Instead of having an always failing test change this test
to test VM's current behavior. This will also allow us to
catch breaking changes in the future.

Closes https://github.com/dart-lang/sdk/issues/53183

R=eernst@google.com

Change-Id: I4ba63dc94d2bd824df44c604b0ca1c57eb8bd559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338124
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2023-11-28 12:50:05 +00:00
Lasse R.H. Nielsen 5642199dd0 Remove uses of : as default value separator in some tests/ directories.
Change-Id: I35bb926e53e92fd02e264fb5b14feadf063fb8db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257961
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-07 14:49:17 +00:00
Paul Berry 5106605af6 Fix context type for conditionals of conditional expressions.
Fixes #48199.

Bug: https://github.com/dart-lang/sdk/issues/48199
Change-Id: I8483e87e4680c1f3ab97f58818eeaa57dec78b07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-01-24 01:25:38 +00:00
Alexander Markov 0f89df0c00 [tests/nnbd] Fork language/bool tests for weak and strong mode
Migrated language/bool tests expect TypeError when null value is used
in a condition (which is still possible if static type of condition is
dynamic). This is right in NNBD strong mode, as implicit cast of null
to bool will fail with TypeError. However, in NNBD weak mode implicit
cast passes, and then AssertionError is thrown as before.
Before migration language_2/bool tests expected AssertionError.

This change forks the tests to behave differently in weak and strong
modes.

Change-Id: Iaba9e606bafe5740a998a60a74a6b54e38cac86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141800
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-04-01 00:35:37 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Robert Nystrom 1c64138e56 Migrate language_2/bool to NNBD.
Change-Id: Id061ea5cb02e6fbac7430df95dc88786ce281363
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137721
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-03-05 18:15:39 +00:00