Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: tests/lib/async/zone_run_unary_test.dart

Issue 2963743002: Revert "Make Zone API strong mode clean." (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/lib/async/zone_run_test.dart ('k') | tests/lib/mirrors/invocation_fuzz_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/zone_run_unary_test.dart
diff --git a/tests/lib/async/zone_run_unary_test.dart b/tests/lib/async/zone_run_unary_test.dart
index 7e6423720eff926862ce5490d1b5941158fc06e4..7005613dcee27936d4dbed7328d624b870788977 100644
--- a/tests/lib/async/zone_run_unary_test.dart
+++ b/tests/lib/async/zone_run_unary_test.dart
@@ -12,17 +12,14 @@ main() {
bool shouldForward = true;
Expect.identical(Zone.ROOT, Zone.current);
- Zone forked = Zone.current.fork(specification: new ZoneSpecification(runUnary:
- <R, T>(Zone self, ZoneDelegate parent, Zone origin, R f(arg), T arg) {
+ Zone forked = Zone.current.fork(specification: new ZoneSpecification(
+ runUnary: (Zone self, ZoneDelegate parent, Zone origin, f(arg), arg) {
// The zone is still the same as when origin.run was invoked, which
// is the root zone. (The origin zone hasn't been set yet).
Expect.identical(Zone.current, Zone.ROOT);
events.add("forked.run1");
- if (shouldForward) {
- var nextArg = (arg as int) + 1;
- return parent.runUnary(origin, f, nextArg as T);
- }
- return 42 as R;
+ if (shouldForward) return parent.runUnary(origin, f, arg + 1);
+ return 42;
}));
events.add("zone forked");
« no previous file with comments | « tests/lib/async/zone_run_test.dart ('k') | tests/lib/mirrors/invocation_fuzz_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698