Skip to content

Commit 35a33c5

Browse files
committed
Adding test to Supply.Seq
1 parent 4fc109a commit 35a33c5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

S17-supply/Seq.t

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
use v6;
2+
3+
use Test;
4+
5+
plan 9;
6+
7+
is-deeply Supply.list, (Supply,).Seq, 'can list a Supply type object';
8+
9+
for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {
10+
diag "**** scheduling with {$*SCHEDULER.WHAT.perl}";
11+
12+
my @a;
13+
for Supply.from-list(2..6).Seq { @a.push($_) };
14+
is-deeply @a, [2..6], "Supply.list works in for";
15+
my @b = Supply.from-list(42..50).Seq;
16+
is-deeply @b, [42..50], "Supply.list can be stored in array";
17+
isa-ok Supply.from-list(2..6) .Seq, Seq, "Supply.Seq should return a Seq";
18+
isa-ok Supply.from-list(42..50) .Seq, Seq, "Supply.Seq should return a Seq";
19+
}
20+
21+
# vim: ft=perl6 expandtab sw=4

0 commit comments

Comments
 (0)