Changeset 21984
- Timestamp:
- 08/21/08 09:36:37 (3 months ago)
- Files:
-
- 1 modified
-
t/spec/S03-operators/reduce-metaop.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S03-operators/reduce-metaop.t
r21983 r21984 109 109 # Check that user defined infix ops work with [...], too. 110 110 sub 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>);111 is(try({ [more_than_plus] 1, 2, 3 }), 8, "[...] reduce metaop works on user defined ops", :todo<bug>); 112 112 113 113 # { … … 130 130 is( [+](), 0, "[+]() returns 0"); 131 131 132 #?pugs todo '[=] meta ops' 132 133 { 133 134 my ($a, $b); 134 135 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)'); 138 139 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)'); 142 143 143 144 dies_ok { [=] "this_is_a_constant", 42 }, 144 "[=] can't assign to constants (1)" , :todo<feature>;145 "[=] can't assign to constants (1)"; 145 146 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)"; 147 148 }
