-
Notifications
You must be signed in to change notification settings - Fork 135
/
roundrobin.t
46 lines (28 loc) · 1.03 KB
/
roundrobin.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
use v6-alpha;
use Test;
plan 8;
# L<S29/Container/"=item roundrobin">
=begin pod
Tests of
our Lazy multi Container::roundrobin( Bool :$shortest,
Bool :$finite, *@@list );
=end pod
ok(roundrobin() eqv (), 'roundrobin null identity');
ok(roundrobin(1) eqv (1,), 'roundrobin scalar identity');
ok(roundrobin(1..3) eqv 1..3, 'roundrobin list identity');
ok(roundrobin([1..3]) eqv 1..3, 'roundrobin array identity');
# Next 2 work. Just waiting on eqv.
#
#?pugs 2 todo 'These tests depend on eqv'
ok(roundrobin({'a'=>1,'b'=>2,'c'=>3}) eqv ('a'=>1,'b'=>2,'c'=>3),
'roundrobin hash identity';
ok(roundrobin((); 1; 2..4; [5..7]; {'a'=>1,'b'=>2})
eqv (1, 2, 5, 'a'=>1, 3, 6, 'b'=>2, 4, 7), 'basic roundrobin');
#?pugs todo 'feature'
ok(roundrobin(:shortest, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest');
#?pugs todo 'these tests depend on lazy roundrobin'
flunk('roundrobin :finite');
=begin lazy_roundrobin
ok(roundrobin(:finite, 1; 1..2; 1..3) eqv (1), 'roundrobin :shortest',
:todo<feature>);
=end lazy_roundrobin