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

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

Issue 12610006: Renamed StreamSink to EventSink. Renamed signalError to addError. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed inheritance back! Now create StreamSink instead of EventSink where we create them. Created 7 years, 9 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
Index: tests/lib/async/stream_event_transform_test.dart
diff --git a/tests/lib/async/stream_event_transform_test.dart b/tests/lib/async/stream_event_transform_test.dart
index debc2c0c801173629de425064643757212b5eea4..1f79f99c063a84e33a00dc1e2a5f10187d6d20fd 100644
--- a/tests/lib/async/stream_event_transform_test.dart
+++ b/tests/lib/async/stream_event_transform_test.dart
@@ -8,37 +8,37 @@ import 'dart:async';
import '../../../pkg/unittest/lib/unittest.dart';
import 'event_helper.dart';
-void handleData(int data, StreamSink<int> sink) {
- sink.signalError(new AsyncError("$data"));
+void handleData(int data, EventSink<int> sink) {
+ sink.addError(new AsyncError("$data"));
sink.add(data + 1);
}
-void handleError(AsyncError e, StreamSink<int> sink) {
+void handleError(AsyncError e, EventSink<int> sink) {
String value = e.error;
int data = int.parse(value);
sink.add(data);
- sink.signalError(new AsyncError("${data + 1}"));
+ sink.addError(new AsyncError("${data + 1}"));
}
-void handleDone(StreamSink<int> sink) {
+void handleDone(EventSink<int> sink) {
sink.add(99);
sink.close();
}
class EventTransformer extends StreamEventTransformer<int,int> {
- void handleData(int data, StreamSink<int> sink) {
- sink.signalError(new AsyncError("$data"));
+ void handleData(int data, EventSink<int> sink) {
+ sink.addError(new AsyncError("$data"));
sink.add(data + 1);
}
- void handleError(AsyncError e, StreamSink<int> sink) {
+ void handleError(AsyncError e, EventSink<int> sink) {
String value = e.error;
int data = int.parse(value);
sink.add(data);
- sink.signalError(new AsyncError("${data + 1}"));
+ sink.addError(new AsyncError("${data + 1}"));
}
- void handleDone(StreamSink<int> sink) {
+ void handleDone(EventSink<int> sink) {
sink.add(99);
sink.close();
}

Powered by Google App Engine
This is Rietveld 408576698