Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test for Supply.flat
  • Loading branch information
lizmat committed Apr 19, 2014
1 parent 729b330 commit 071ebd3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion S17-concurrency/supply.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 134;
plan 140;

sub tap_ok ( $s, $expected, $text ) {
ok $s ~~ Supply, "{$s.^name} appears to be doing Supply";
Expand Down Expand Up @@ -72,6 +72,9 @@ for (ThreadPoolScheduler, CurrentThreadScheduler) {
is $seen, 10, "did the side effect work";
}

tap_ok Supply.for( [1,2],[3,4,5] ).flat,
[1..5], "On demand publish with flat";

tap_ok Supply.for( (1..5).map( {[$_]} ) ),
[[1],[2],[3],[4],[5]], "On demand publish with arrays";

Expand Down

0 comments on commit 071ebd3

Please sign in to comment.