Changeset 21984

Show
Ignore:
Timestamp:
08/21/08 09:36:37 (3 months ago)
Author:
moritz
Message:

[t/spec] cleanups in reduce-metaop.t

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S03-operators/reduce-metaop.t

    r21983 r21984  
    109109# Check that user defined infix ops work with [...], too. 
    110110sub infix:<more_than_plus>(Int $a, Int $b) { $a + $b + 1 } 
    111 is(try { [more_than_plus] 1, 2, 3 }, 8, "[...] reduce metaop works on user defined ops", :todo<bug>); 
     111is(try({ [more_than_plus] 1, 2, 3 }), 8, "[...] reduce metaop works on user defined ops", :todo<bug>); 
    112112 
    113113# { 
     
    130130is( [+](), 0, "[+]() returns 0"); 
    131131 
     132#?pugs todo '[=] meta ops' 
    132133{ 
    133134  my ($a, $b); 
    134135 
    135   ok ([=] $a, $b, 3), '[=] evaluates successfully', :todo<feature>; 
    136   is($a, 3, '[=] assigns successfully (1)', :todo<feature>); 
    137   is($b, 3, '[=] assigns successfully (2)', :todo<feature>); 
     136  ok ([=] $a, $b, 3), '[=] evaluates successfully'; 
     137  is($a, 3, '[=] assigns successfully (1)'); 
     138  is($b, 3, '[=] assigns successfully (2)'); 
    138139 
    139   ok try { ([=] $a, $b, 4) = 5 }, '[=] lvalue context restored (1)'; 
    140   is($a, 5, '[=] lvalue context restored (2)', :todo<feature>); 
    141   is($b, 4, '[=] lvalue context restored (3)', :todo<feature>); 
     140  ok try({ ([=] $a, $b, 4) = 5 }), '[=] lvalue context restored (1)'; 
     141  is($a, 5, '[=] lvalue context restored (2)'); 
     142  is($b, 4, '[=] lvalue context restored (3)'); 
    142143 
    143144  dies_ok { [=] "this_is_a_constant", 42 }, 
    144       "[=] can't assign to constants (1)", :todo<feature>; 
     145      "[=] can't assign to constants (1)"; 
    145146  dies_ok { [=] $a, $b, "this_is_a_constant", 42 }, 
    146       "[=] can't assign to constants (2)", :todo<feature>; 
     147      "[=] can't assign to constants (2)"; 
    147148}