Changeset 22003

Show
Ignore:
Timestamp:
08/21/08 21:39:26 (3 months ago)
Author:
moritz
Message:

[t/spec] remove usage of try as a function

Files:
1 modified

Legend:

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

    r21984 r22003  
    9393  # 18:45 < autrijus> [=>] 1..10; 
    9494  my $list = [=>] 1,2,3; 
    95   is $list.key,                1, "[=>] works (1)"; 
    96   is try({$list.value.key}),   2, "[=>] works (2)"; 
    97   is try({$list.value.value}), 3, "[=>] works (3)"; 
     95  is $list.key,                 1, "[=>] works (1)"; 
     96  is (try {$list.value.key}),   2, "[=>] works (2)"; 
     97  is (try {$list.value.value}), 3, "[=>] works (3)"; 
    9898} 
    9999 
     
    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# { 
     
    138138  is($b, 3, '[=] assigns successfully (2)'); 
    139139 
    140   ok try({ ([=] $a, $b, 4) = 5 }), '[=] lvalue context restored (1)'; 
     140  lives_ok { ([=] $a, $b, 4) = 5 }, '[=] lvalue context restored (1)'; 
    141141  is($a, 5, '[=] lvalue context restored (2)'); 
    142142  is($b, 4, '[=] lvalue context restored (3)');