Commit Graph

16 Commits

Author SHA1 Message Date
Lasse R.H. Nielsen 659978fcb3 Convert multitests in core platform library tests.
A little extra clean-up in related files.

Change-Id: I1d0d809d1ab4d756470e3a292e8e070ef31304af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/402660
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2025-09-16 02:05:23 -07:00
Robert Nystrom d3904f5a54 Reformat tests/lib/async/** using 3.8 style.
Change-Id: I6ccbe1494165c2bda142ece13584c4738e3b43e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/425347
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2025-05-02 04:08:54 -07:00
Lasse R.H. Nielsen f8086c81ae Collect all test-related files in package:expect.
Collects files from `package:async_helper` and `tests/language`
that are generally useful, so that all test-related helpers are
in `package:expect`.

Moves the two libraries from `package:async_helper` into `package:expect`,
and the `tests/language/static_type_helper.dart` file too.

Deprecates `async_minitest.dart`, to follow `minitest.dart`,
expecting the Flutter use of it to have been fixed to not break
on deprecation (I believe Flutter no longer breaks builds on deprecations at all).

Patch 1 is the actual change.
Patch 2+4+8 is changing all existing references to the files.
Patch 6 ignores deprecation in files still using `async_minitest.dart`.

3+5+7+9 are updating this text to make the numbers match.
Then it's just test-expectations and small tweaks from there.

Change-Id: I1b665135b5fef9b9a0c3b340ffe9daf874d0174c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2024-10-11 16:53:52 +00:00
Lasse R.H. Nielsen b06a34fc5a Don't allow completing a _Future with itself.
This never worked. It was silently accepted, at least if the future had no listeners, then any later attempt to use the future would cause a stack overflow or other impossible results.

Moves some `_Future._complete` call out of try-catch.
The `_complete` shouldn't throw (but before this fix it could).
Moving them out of the `try`/`catch` makes such errors be reported
as unhandled, instead of catching them and trying to complete the same
future again with an error, when it's possibly in an inconsistent state.

Fixes #43662.
Based on https://github.com/dart-lang/sdk/issues/43662#issuecomment-2058870247

CoreLibraryReviewExempt: No response.
Bug: http://dartbug.com/43662
Change-Id: I96a4f01bcd5b6cee93bba267299852569a9b905c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/363060
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-05-14 15:44:07 +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
Ben Konyi 55612ef10c Migrated test block 167 to Dart 2.0.
No manual work required for this block.

BUG=
R=jcollins@google.com

Review-Url: https://codereview.chromium.org/2993213003 .
2017-08-17 12:42:36 -07: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
floitsch@google.com 7de52b638e Don't consider controller.addError to be a zone-crossing.
BUG= http://dartbug.com/18776
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38120 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 13:51:03 +00:00
floitsch@google.com 0f7a0bd7b1 Rename runAsync to scheduleMicrotask.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28569 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 15:52:17 +00:00
floitsch@google.com dc9c5f42ed Redo StreamTransformers so they work with Stack traces.
Since this involved a breaking change I cleaned up more of the
StreamTransformer API.

This CL also deprecates the getAttachedStackTrace method.

R=ajohnsen@google.com, lrn@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28562 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 12:34:34 +00:00
floitsch@google.com 35e2ed1e57 Expose Zones.
BUG= http://dartbug.com/11279
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27802 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-24 09:22:26 +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 2ae198d527 Reapply "Zone support for Futures, Timer, Streams."
This reapplies commit r24034.
This reapplies commit r24035.
This reapplies commit r24036.
This reapplies commit r24037.

+ some status file updates and fixes.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24064 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-15 11:28:38 +00:00
floitsch@google.com bcba9d5c8c Revert "Zone support for Futures."
Revert "Add Zone support for Timers."
Revert "Add zone support to streams."
Revert "catchErrors and waitForCompletion now based on runZonedExperimental."

This reverts commit r24034.
This reverts commit r24035.
This reverts commit r24036.
This reverts commit r24037.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24042 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 17:17:16 +00:00
floitsch@google.com 9485a093ae catchErrors and waitForCompletion now based on runZonedExperimental.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24037 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 16:29:32 +00:00
floitsch@google.com 496f6dca97 Add zone support to streams.
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24036 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 16:28:32 +00:00