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

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

Issue 11862008: Make Streams also cosider a thrown AsyncError a rethrow. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address reciew comments. Created 7 years, 11 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_async_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_controller_test.dart
diff --git a/tests/lib/async/stream_controller_test.dart b/tests/lib/async/stream_controller_test.dart
index 5b63dc9f51baa97161a4822855f406567f54e935..37c1bf9e93c410e0ece62d00bcfe6907f33ed849 100644
--- a/tests/lib/async/stream_controller_test.dart
+++ b/tests/lib/async/stream_controller_test.dart
@@ -63,7 +63,7 @@ testController() {
sentEvents = new Events()..add("ab")..error("foo")..add("ab")..close();
actualEvents = new Events.capture(c.handleError((v) {
if (v.error is String) {
- return new AsyncError("[${v.error}]",
+ throw new AsyncError("[${v.error}]",
"other stack");
}
}), unsubscribeOnError: true);
@@ -115,7 +115,7 @@ testController() {
c.where((v) => v is String)
.mappedBy((v) => int.parse(v))
.handleError((v) {
- if (v.error is! FormatException) return v;
+ if (v.error is! FormatException) throw v;
})
.where((v) => v > 10),
unsubscribeOnError: true);
@@ -203,7 +203,7 @@ testSingleController() {
sentEvents = new Events()..add("ab")..error("foo")..add("ab")..close();
actualEvents = new Events.capture(c.handleError((v) {
if (v.error is String) {
- return new AsyncError("[${v.error}]",
+ throw new AsyncError("[${v.error}]",
"other stack");
}
}), unsubscribeOnError: true);
@@ -267,7 +267,7 @@ testSingleController() {
c.where((v) => v is String)
.mappedBy((v) => int.parse(v))
.handleError((v) {
- if (v.error is! FormatException) return v;
+ if (v.error is! FormatException) throw v;
})
.where((v) => v > 10),
unsubscribeOnError: true);
« no previous file with comments | « tests/lib/async/stream_controller_async_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698