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

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

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 8 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/stream_controller_test.dart ('k') | tests/lib/async/stream_single_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 78c79cdcab98e9cfa00e3e7a01053651879f0a5d..87f114c8a43348dd06a8a738702535418d998f95 100644
--- a/tests/lib/async/stream_event_transform_test.dart
+++ b/tests/lib/async/stream_event_transform_test.dart
@@ -10,15 +10,15 @@ import '../../../pkg/unittest/lib/unittest.dart';
import 'event_helper.dart';
void handleData(int data, EventSink<int> sink) {
- sink.addError(new AsyncError("$data"));
+ sink.addError("$data");
sink.add(data + 1);
}
-void handleError(AsyncError e, EventSink<int> sink) {
- String value = e.error;
+void handleError(error, EventSink<int> sink) {
+ String value = error;
int data = int.parse(value);
sink.add(data);
- sink.addError(new AsyncError("${data + 1}"));
+ sink.addError("${data + 1}");
}
void handleDone(EventSink<int> sink) {
@@ -28,15 +28,14 @@ void handleDone(EventSink<int> sink) {
class EventTransformer extends StreamEventTransformer<int,int> {
void handleData(int data, EventSink<int> sink) {
- sink.addError(new AsyncError("$data"));
+ sink.addError("$data");
sink.add(data + 1);
}
- void handleError(AsyncError e, EventSink<int> sink) {
- String value = e.error;
+ void handleError(String value, EventSink<int> sink) {
int data = int.parse(value);
sink.add(data);
- sink.addError(new AsyncError("${data + 1}"));
+ sink.addError("${data + 1}");
}
void handleDone(EventSink<int> sink) {
« no previous file with comments | « tests/lib/async/stream_controller_test.dart ('k') | tests/lib/async/stream_single_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698