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

Unified Diff: pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart

Issue 164773003: Change ScheduledProcess's output streams over to be ScheduledStreams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 10 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 | « pkg/scheduled_test/test/scheduled_process_test.dart ('k') | pkg/watcher/pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
diff --git a/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart b/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
index b08fc378039c2213aefb76033c5f34ec48fb41c0..127cd04776998f88561d9d5c188d0026cd18bd46 100644
--- a/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
+++ b/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
@@ -264,6 +264,29 @@ void main(_, message) {
stream.expect(1);
});
+ expectTestPasses("never() consumes everything if the matcher never matches",
+ () {
+ var stream = createStream();
+ stream.expect(never(inOrder([2, 1])));
+ });
+
+ expectTestFails("never() fails if the matcher matches", () {
+ var stream = createStream();
+ stream.expect(never(inOrder([2, 3])));
+ }, (errors) {
+ expect(errors, hasLength(1));
+ expect(errors.first.error.message, equals(
+ "Expected: never\n"
+ " | * <2>\n"
+ " | * <3>\n"
+ " Emitted: * 1\n"
+ " * 2\n"
+ " * 3\n"
+ " Which: matched\n"
+ " | * <2>\n"
+ " | * <3>"));
+ });
+
expectTestPasses("isDone succeeds at the end of the stream", () {
var stream = createStream();
stream.expect(consumeThrough(5));
« no previous file with comments | « pkg/scheduled_test/test/scheduled_process_test.dart ('k') | pkg/watcher/pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698