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

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

Issue 25354003: Redo StreamTransformers so they work with Stack traces. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 2 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/event_helper.dart ('k') | tests/lib/async/stream_controller_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/first_regression_test.dart
diff --git a/tests/lib/async/first_regression_test.dart b/tests/lib/async/first_regression_test.dart
index a8a512d750cb7757adccd6e27e7aab32c5f713f5..69e18ede87e65adf150ddd36c0388c779c1615b2 100644
--- a/tests/lib/async/first_regression_test.dart
+++ b/tests/lib/async/first_regression_test.dart
@@ -8,10 +8,14 @@ library first_regression_test;
import 'dart:async';
import '../../../pkg/unittest/lib/unittest.dart';
-class DoubleTransformer<T> extends StreamEventTransformer<T, T> {
- void handleData(T data, EventSink<T> sink) {
- sink.add(data);
- sink.add(data);
+class DoubleTransformer<T> implements StreamTransformer<T, T> {
+ Stream<T> bind(Stream<T> stream) {
+ var transformer = new StreamTransformer<T, T>.fromHandlers(
+ handleData: (T data, EventSink<T> sink) {
+ sink.add(data);
+ sink.add(data);
+ });
+ return transformer.bind(stream);
}
}
« no previous file with comments | « tests/lib/async/event_helper.dart ('k') | tests/lib/async/stream_controller_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698