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 726904ac17 Add onError extension method to Future.
Provides better typing than `catchError`.

Change-Id: If0d4487b7c3a499160fb719740a1d65c0545024d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151512
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-01-21 23:13:56 +00:00
Liam Appelbe 428b3c4473 [nnbd] Fix some async tests in strong mode
Fixes:
lib/async/catch_errors6_test
lib/async/catch_errors7_test
lib/async/catch_errors8_test
lib/async/catch_errors_test
lib/async/intercept_print1_test
lib/async/intercept_schedule_microtask1_test
lib/async/intercept_schedule_microtask2_test
lib/async/intercept_schedule_microtask3_test
lib/async/intercept_schedule_microtask4_test
lib/async/intercept_schedule_microtask5_test
lib/async/intercept_schedule_microtask6_test
lib/async/run_zoned7_test
lib/async/run_zoned8_test
lib/async/stream_controller_test
lib/async/stream_event_transformed_test
lib/async/stream_from_iterable_test
lib/async/stream_single_test
lib/async/stream_single_to_multi_subscriber_test
lib/async/stream_state_nonzero_timer_test
lib/async/stream_state_test
lib/async/stream_transform_test
lib/async/stream_transformation_broadcast_test
lib/async/stream_transformer_from_bind_test
lib/async/stream_transformer_from_handlers_test
lib/async/zone_future_schedule_microtask_test
lib/async_star/await_for_test
lib/async_star/await_pauses_test
Change-Id: I9d5d92938c28cc8131c70665ead4d44ffcff6bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143001
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-04-09 22:01:42 +00:00
Lasse R.H. Nielsen 8760283247 New implementation of runZoned.
A combination of `runZoned` and `runZonedGuarded` where only the latter allows an `onError` parameter,
and only that has a nullable return type.

Retains the `onError` parameter on `runZoned` for now because it's too breaking to remove it until packages have been migrated off of it.
It will be removed in a follow-up CL.

Change-Id: If0e86c8d14e13fa089c66f4af975aeacb2616cf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137302
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-03-25 00:24:33 +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
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 930cf81a5a Fix indentation.
Review URL: https://codereview.chromium.org//44113003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29250 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 13:08:43 +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 956243966a Add second argument to Future error handlers.
R=lrn@google.com, nweiz@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28510 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 11:42:39 +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 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