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

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

Issue 48543002: Make Stream.fromIterable only accept a single listen call. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « sdk/lib/async/stream_impl.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_from_iterable_test.dart
diff --git a/tests/lib/async/stream_from_iterable_test.dart b/tests/lib/async/stream_from_iterable_test.dart
index ab7d543724aa7dc4ef760d599f5af415e51f4520..7398fe0e51f130151c9d27d35d20742dd2ec7a30 100644
--- a/tests/lib/async/stream_from_iterable_test.dart
+++ b/tests/lib/async/stream_from_iterable_test.dart
@@ -73,4 +73,11 @@ main() {
Expect.listEquals(expected.events, actual.events);
}));
});
+
+ test("iterable-single-subscription", () {
+ Stream stream = new Stream.fromIterable(iter);
+ stream.listen((x){});
+ Expect.throws(() { stream.listen((x){}); },
+ (e) => e is StateError);
+ });
}
« no previous file with comments | « sdk/lib/async/stream_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698