Changeset 22007

Show
Ignore:
Timestamp:
08/22/08 16:17:27 (3 months ago)
Author:
moritz
Message:

[t] some fixes for try as a function

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/operators/binding/nested.t

    r20490 r22007  
    256256 
    257257    try { $bar[1]<key><subkey> := $foo[1]<key> }; 
    258     is try{ $bar[1]<key><subkey><subkey>[1] }, 2, 
     258    is (try { $bar[1]<key><subkey><subkey>[1] }), 2, 
    259259        "binding an element of a structure to an element of another structure works (1)"; 
    260260 
    261261    try { $foo[1]<key><subkey>[1] = 7 }; 
    262     is try{ $bar[1]<key><subkey><subkey>[1] }, 7, 
     262    is (try { $bar[1]<key><subkey><subkey>[1] }), 7, 
    263263        "binding an element of a structure to an element of another structure works (2)"; 
    264264 
    265265    try { $bar[1]<key><subkey><subkey>[1] = 8 }; 
    266     is try { $foo[1]<key><subkey>[1] }, 8, 
     266    is (try { $foo[1]<key><subkey>[1] }), 8, 
    267267        "binding an element of a structure to an element of another structure works (3)"; 
    268268} 
     
    286286 
    287287    try { $struct[1]<key><subkey>[1] := $struct[1]<key> }; 
    288     is try { $struct[1]<key><subkey>[1]<foo> }, "bar", 
     288    is (try { $struct[1]<key><subkey>[1]<foo> }), "bar", 
    289289        "binding an element of a structure to an element of the same structure works (1)"; 
    290290 
     
    294294 
    295295    $struct[1]<key><foo> = "very_new_value"; 
    296     is try { $struct[1]<key><subkey>[1]<foo> }, "very_new_value", 
     296    is (try { $struct[1]<key><subkey>[1]<foo> }), "very_new_value", 
    297297        "binding an element of a structure to an element of the same structure works (3)"; 
    298298