Changeset 22531

Show
Ignore:
Timestamp:
10/08/08 08:32:24 (3 months ago)
Author:
lwall
Message:

[series.t] syntax error, added a few tests for list return

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S03-operators/series.t

    r22519 r22531  
    44# L<S03/List infix precedence/"the series operator"> 
    55 
    6 plan 24; 
     6plan 31; 
    77 
    88{ 
     
    3636{ 
    3737    my @letters = <a b> ... { .succ }; 
    38     is @letters[0], 'a' 'infix:<...> works arith arity one (.succ) (0)'; 
    39     is @letters[1], 'b' 'infix:<...> works arith arity one (.succ) (1)'; 
    40     is @letters[2], 'c' 'infix:<...> works arith arity one (.succ) (2)'; 
    41     is @letters[3], 'd' 'infix:<...> works arith arity one (.succ) (3)'; 
     38    is @letters[0], 'a', 'infix:<...> works arith arity one (.succ) (0)'; 
     39    is @letters[1], 'b', 'infix:<...> works arith arity one (.succ) (1)'; 
     40    is @letters[2], 'c', 'infix:<...> works arith arity one (.succ) (2)'; 
     41    is @letters[3], 'd', 'infix:<...> works arith arity one (.succ) (3)'; 
    4242} 
    4343 
     
    6868} 
    6969 
     70{ # 1 1, 2 2s, 3 3s, etc. 
     71    my @xxed = 1 ... { my $next = $^a + 1; $next xx $next }; 
     72    is @xxed[0], 1,  'infix:<...> with list return (0)'; 
     73    is @xxed[1], 2 , 'infix:<...> with list return (1)'; 
     74    is @xxed[2], 2,  'infix:<...> with list return (2)'; 
     75    is @xxed[3], 3,  'infix:<...> with list return (3)'; 
     76    is @xxed[4], 3,  'infix:<...> with list return (4)'; 
     77    is @xxed[5], 3, 'infix:<...> with list return (5)'; 
     78    is @xxed[6], 4, 'infix:<...> with list return (6)'; 
     79} 
     80 
    7081# vim: ft=perl6