Commit Graph

22 Commits

Author SHA1 Message Date
Johnni Winther 645f3acca7 [cfe] Update greatest closure of ? to Object?
Closes #41386

Change-Id: I1a5a4cdc35cef37c7a8ba6a6aecb99457789bcdc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144940
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-05-04 08:14:43 +00:00
Leaf Petersen 6fd7c57f4e Fix incorrect assert in null safe Future.wait and add regression test.
Closes https://github.com/dart-lang/sdk/issues/41656 .

Change-Id: I4472f34a4011e18f9f5d4db4f7a3dfd3eb6a8366
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144809
Auto-Submit: Leaf Petersen <leafp@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-04-25 00:00:37 +00:00
Liam Appelbe 8829ddc992 [nnbd] Fix the remaining futures tests in strong mode
Change-Id: I5c388b3321a18f62b225d68c295b8d55ab2651fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142994
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-04-15 18:30:23 +00:00
Leaf Petersen 7aace6fa60 Make StackTrace generally not nullable in migrated NNBD library.
Bug: https://github.com/dart-lang/sdk/issues/40130
Change-Id: I13aba0c2a3fa5b1c3d3995f075ffd38f03aca897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139880
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-19 23:31:30 +00:00
Mark Zhou 684c53a6f1 [tests] Fixing some null-safe strong mode tests.
Change-Id: I131754d0183bed52e6443c2511197ed3b1e63b04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138887
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-11 15:41:59 +00:00
Robert Nystrom a2b556b937 Migrate lib_2/async to NNBD.
Change-Id: Ia5c41dda6503e1fbb8cc6099835d07588425e2ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128310
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-01-09 22:04:37 +00:00
Bob Nystrom f6ca2c1d8f Remove the Dart 1 tests.
This deletes:

tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib

It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)

I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)

"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."

- Ray Bradbury, Fahrenheit 451

Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-10-11 23:45:18 +00:00
Lasse R.H. Nielsen 8c742bd500 Change Future.doWhile to use a loop for non-future results instead of recursion.
Avoids stack overflow on long sequences of non-future results.

R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2853203002 .
2017-05-02 12:56:55 +02:00
Jacob Richman 2dcd56ef43 Format all tests.
There are far too many files here to review everyone carefully.
Spot checking most of the diffs look good as test code is generally written
with less care than application code so lots of ugly formatting get through.
If people notice files where the automated formatting bothers them feel free
to comment indicating file names and I'll move spaces within comments to make
the formatting cleaner and use comments to force block formatting as I have
done for other case where formatting looked bad.

BUG=
R=efortuna@google.com

Review-Url: https://codereview.chromium.org/2771453003 .
2017-04-17 14:53:02 -07:00
nweiz@google.com b71b5adb62 Add Future.doWhile to dart:async.
This makes both Future.doWhile and Future.forEach interact more
intuitively with zones. It also explicitly allows the callback to
Future.forEach to return a non-Future value.

BUG=http://dartbug.com/19645, http://dartbug.com/19646
RELNOTE=Add Future.doWhile and allow Future.forEach's callback to return a non-Future.
R=lrn@google.com

Review URL: https://codereview.chromium.org//356773005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37750 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-26 19:53:38 +00:00
lrn@google.com f3a501e7c6 Make Future.wait have an eagerError option that defaults to false.
This means that Future.wait will, by default, wait for all futures to
complete, even if there is an error.
All but the first error are dropped, and the future completes with the
first error.

If eagerError is set to true, the returned future completes immediately
on the first error.

BUG= http://dartbug.com/14794
R=floitsch@google.com

Review URL: https://codereview.chromium.org//68523005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30443 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 09:28:48 +00:00
floitsch@google.com 8fdee3bb18 Propagate stack trace when using Future.wait.
BUG= http://dartbug.com/14755
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//56123012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29923 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 18:42:48 +00:00
floitsch@google.com 113c812877 Replace ReceivePorts with asyncStart|End in some tests.
R=kustermann@google.com

Review URL: https://codereview.chromium.org//23522012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26996 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-02 08:23:21 +00:00
floitsch@google.com 466d6670c1 Refactor Future constructors.
BUG=

Review URL: https://codereview.chromium.org//14070010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21517 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 21:24:27 +00:00
floitsch@google.com 5431a5af54 Remove AsyncError with Expando.
Review URL: https://codereview.chromium.org//14251006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21498 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 18:58:32 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

Review URL: https://codereview.chromium.org//12743005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
nweiz@google.com 987dc18324 Make sure Future.forEach properly pipes exceptions.
BUG=8817

Review URL: https://codereview.chromium.org//12317139

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19164 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 19:22:27 +00:00
lrn@google.com 4868ee2110 Remove Futures class, move methods to Future.
Optimize Future.forEach, Future.delay.

Review URL: https://codereview.chromium.org//11865005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16954 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-11 09:46:45 +00:00
nweiz@google.com 72630960c5 Fix Futures.wait.
The old implementation would throw any errors emitted by any sub-future to the
top level.

Review URL: https://codereview.chromium.org//11818013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16881 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 20:41:57 +00:00
lrn@google.com 2b2de751a7 Fixed status files for dart2js corelib/lib/language tests.
Moved two tests to lib/async where they belong.

R=floitsch@google.com
CC=karlklose@google.com

Review URL: https://codereview.chromium.org//11784020

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16699 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 14:15:29 +00:00