Skip to content

Commit a42f0a6

Browse files
committed
redo roundrobin tests; delete tests for unspecced features
1 parent 4ba3eed commit a42f0a6

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

S32-container/roundrobin.t

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use v6;
22

33
use Test;
44

5-
plan 8;
5+
plan 5;
66

77
# L<S32::Containers/Container/"=item roundrobin">
88

@@ -15,34 +15,17 @@ Tests of
1515
1616
=end pod
1717

18-
ok(roundrobin() eqv (), 'roundrobin null identity');
18+
is roundrobin().elems, 0, 'roundrobin null identity';
1919

20-
ok(roundrobin(1) eqv (1,), 'roundrobin scalar identity');
20+
is roundrobin(1).join, '1', 'roundrobin scalar identity';
2121

22-
ok(roundrobin(1..3) eqv 1..3, 'roundrobin list identity');
22+
is(roundrobin(1..3).Str, (1..3).Str, 'roundrobin list identity');
2323

24-
ok(roundrobin([1..3]) eqv 1..3, 'roundrobin array identity');
24+
#?rakudo todo 'over-flattening
25+
is(roundrobin([1..3]).elems, 1, 'roundrobin does not flatten array items');
2526

26-
# Next 2 work. Just waiting on eqv.
27-
#
28-
#?pugs 2 todo 'These tests depend on eqv'
29-
ok(roundrobin({'a'=>1,'b'=>2,'c'=>3}) eqv ('a'=>1,'b'=>2,'c'=>3),
30-
'roundrobin hash identity');
3127

32-
ok(roundrobin((); 1; 2..4; [5..7]; {'a'=>1,'b'=>2})
33-
eqv (1, 2, 5, 'a'=>1, 3, 6, 'b'=>2, 4, 7), 'basic roundrobin');
34-
35-
#?pugs skip 'Named argument found where no matched parameter expected'
36-
ok(roundrobin(:shortest, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest');
37-
38-
#?pugs todo
39-
flunk('roundrobin :finite');
40-
41-
=begin lazy_roundrobin
42-
43-
#?pugs todo 'feature'
44-
ok(roundrobin(:finite, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest');
45-
46-
=end lazy_roundrobin
28+
is(roundrobin((); 1; 2..4; (5..7); <a b>).join(' '),
29+
(1, 2, 5, 'a', 3, 6, 'b', 4, 7).join(' '), 'basic roundrobin');
4730

4831
# vim: ft=perl6

0 commit comments

Comments
 (0)