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

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

Issue 167103003: Support serving from multiple directories using "pub serve". (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
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 127cd04776998f88561d9d5c188d0026cd18bd46..93c6b43cf4d02309417e15d5e33690f95e1a03b9 100644
--- a/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
+++ b/pkg/scheduled_test/test/scheduled_stream/stream_matcher_test.dart
@@ -208,6 +208,20 @@ void main(_, message) {
" Which: unexpected end of stream"));
});
+ expectTestPasses("consumeWhile() consumes values while the given matcher "
+ "matches", () {
+ var stream = createStream();
+ stream.expect(consumeWhile(lessThan(4)));
+ stream.expect(4);
+ });
+
+ expectTestPasses("consumeWhile() will stop if the first value doesn't match",
+ () {
+ var stream = createStream();
+ stream.expect(consumeWhile(2));
+ stream.expect(1);
+ });
+
expectTestPasses("either() will match if the first branch matches", () {
createStream().expect(either(1, 100));
});
« no previous file with comments | « pkg/scheduled_test/lib/src/stream_matcher.dart ('k') | sdk/lib/_internal/pub/lib/src/barback/build_environment.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698