Skip to content

Commit 4c5ef0c

Browse files
committed
Test sink of HyperSeq/RaceSeq
1 parent 6713a08 commit 4c5ef0c

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

S07-hyperrace/hyper.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 45;
4+
plan 46;
55

66
{
77
my @result = <a b c d e f g>.hyper.map({ $_.uc });
@@ -171,3 +171,9 @@ is ([+] (1..100).hyper.grep(* != 22)), 5028,
171171
is ([+] (1..100).grep(* != 22).hyper), 5028,
172172
'Correct result for [+] (1..100).grep(* != 22).hyper';
173173
is (^100 .hyper.elems), 100, '.hyper.elems works';
174+
175+
{
176+
my atomicint $i = 0;
177+
(^10000).hyper.map: { $i++ }
178+
is $i, 10000, 'hyper map in sink context iterates';
179+
}

S07-hyperrace/race.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use v6;
22
use Test;
33

4-
plan 34;
4+
plan 35;
55

66
{
77
my @result = <a b c d e f g>.race.map({ $_.uc });
@@ -150,3 +150,9 @@ is ([+] (1..100).race.grep(* != 22)), 5028,
150150
is ([+] (1..100).grep(* != 22).race), 5028,
151151
'Correct result for [+] (1..100).grep(* != 22).race';
152152
is (^100 .race.elems), 100, '.race.elems works';
153+
154+
{
155+
my atomicint $i = 0;
156+
(^10000).race.map: { $i++ }
157+
is $i, 10000, 'race map in sink context iterates';
158+
}

0 commit comments

Comments
 (0)