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

Unified Diff: tests/lib_strong/async/stream_listen_zone_test.dart

Issue 3014593002: Use generic functions in zones. (Closed)
Patch Set: Added changes missing from patch set #2 Created 3 years, 3 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_strong/async/run_zoned9_test.dart ('k') | tests/lib_strong/async/zone_bind_callback_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib_strong/async/stream_listen_zone_test.dart
diff --git a/tests/lib_strong/async/stream_listen_zone_test.dart b/tests/lib_strong/async/stream_listen_zone_test.dart
index 6aae8fed14c73e8dd3d296dd70e1079c740382ed..86c017133099cf402e9f7f21d4f76ba58c1da5dd 100644
--- a/tests/lib_strong/async/stream_listen_zone_test.dart
+++ b/tests/lib_strong/async/stream_listen_zone_test.dart
@@ -64,27 +64,28 @@ void testStream(
registerExpect += 3;
Expect.equals(registerExpect, registerCount, name);
},
- zoneSpecification:
- new ZoneSpecification(registerCallback: (self, p, z, callback()) {
+ zoneSpecification: new ZoneSpecification(
+ registerCallback: <R>(self, p, z, R callback()) {
Expect.identical(zone, self, name);
registerCount++;
return () {
Expect.identical(zone, Zone.current, name);
- callback();
+ return callback();
};
- }, registerUnaryCallback: (self, p, z, callback(a)) {
+ }, registerUnaryCallback: <R, T>(self, p, z, R callback(T a)) {
Expect.identical(zone, self, name);
registerCount++;
return (a) {
Expect.identical(zone, Zone.current, name);
- callback(a);
+ return callback(a);
};
- }, registerBinaryCallback: (self, package, z, callback(a, b)) {
+ }, registerBinaryCallback:
+ <R, T1, T2>(self, package, z, R callback(T1 a, T2 b)) {
Expect.identical(zone, self, name);
registerCount++;
return (a, b) {
Expect.identical(zone, Zone.current, name);
- callback(a, b);
+ return callback(a, b);
};
}));
« no previous file with comments | « tests/lib_strong/async/run_zoned9_test.dart ('k') | tests/lib_strong/async/zone_bind_callback_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698