Changeset 22545
- Timestamp:
- 10/08/08 22:02:00 (6 weeks ago)
- Files:
-
- 1 modified
-
t/spec/S03-operators/hyper.t (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
t/spec/S03-operators/hyper.t
r22144 r22545 183 183 @r = -« ([1, 2], [3, [4, 5]]); 184 184 my @e = ([-1, -2], [-3, [-4, -5]]); 185 is _deeply(~@r, ~@e, "distribution for unary prefix");185 is(~@r, ~@e, "distribution for unary prefix"); 186 186 187 187 @r = -<< ([1, 2], [3, [4, 5]]); 188 188 @e = ([-1, -2], [-3, [-4, -5]]); 189 is _deeply(~@r, ~@e, "distribution for unary prefix, ASCII");189 is(~@r, ~@e, "distribution for unary prefix, ASCII"); 190 190 }; 191 191 … … 195 195 try { @r»++ }; 196 196 my @e = ([2, 3], [4, [5, 6]]); 197 is _deeply(~@r, ~@e, "distribution for unary postfix autoincr", :todo);197 is(~@r, ~@e, "distribution for unary postfix autoincr", :todo); 198 198 199 199 @r = ([1, 2], [3, [4, 5]]); 200 200 try { @r>>++ }; 201 201 @e = ([2, 3], [4, [5, 6]]); 202 is _deeply(~@r, ~@e, "distribution for unary postfix autoincr, ASCII", :todo);202 is(~@r, ~@e, "distribution for unary postfix autoincr, ASCII", :todo); 203 203 }; 204 204 … … 207 207 @r = (1, 2, [3, 4]) »+« (4, 5, [6, 7]); 208 208 my @e = (5, 7, [9, 11]); 209 is_deeply(~@r, ~@e, 210 "distribution for binary infix, same shape"); 209 is(~@r, ~@e, "distribution for binary infix, same shape"); 211 210 212 211 213 212 @r = (1, 2, [3, 4]) >>+<< (4, 5, [6, 7]); 214 213 @e = (5, 7, [9, 11]); 215 is_deeply(~@r, ~@e, 216 "distribution for binary infix, same shape, ASCII", 217 ); 214 is(~@r, ~@e, "distribution for binary infix, same shape, ASCII"); 218 215 219 216 @r = (1, 2, [3, 4]) »+« (5, 6, 7); 220 217 @e = (6, 8, [10, 11]); 221 is_deeply(~@r, ~@e, 222 "distribution for binary infix, dimension upgrade", 223 ); 218 is(~@r, ~@e, "distribution for binary infix, dimension upgrade"); 224 219 225 220 @r = (1, 2, [3, 4]) >>+<< (5, 6, 7); 226 221 @e = (6, 8, [10, 11]); 227 is_deeply(~@r, ~@e, 228 "distribution for binary infix, dimension upgrade, ASCII", 229 ); 222 is(~@r, ~@e, "distribution for binary infix, dimension upgrade, ASCII"); 230 223 231 224 @r = ([1, 2], 3) »+« (4, [5, 6]); 232 225 @e = ([5, 6], [8, 9]); 233 is_deeply(~@r, ~@e, 234 "distribution for binary infix, S03 cross-upgrade", 235 ); 226 is(~@r, ~@e, "distribution for binary infix, S03 cross-upgrade"); 236 227 237 228 @r = ([1, 2], 3) >>+<< (4, [5, 6]); 238 229 @e = ([5, 6], [8, 9]); 239 is_deeply(~@r, ~@e, 240 "distribution for binary infix, S03 cross-upgrade, ASCII", 241 ); 230 is(~@r, ~@e, "distribution for binary infix, S03 cross-upgrade, ASCII"); 242 231 }; 243 232 … … 270 259 =end todo unspecced 271 260 261 #?pugs todo 'hyper ops' 272 262 { # hyper dereferencing 273 263 my @array = ( … … 278 268 279 269 my $full = join '', eval '@array>>.<key>'; 280 is($full, 'valvalval', 'hyper-dereference an array' ,:todo);270 is($full, 'valvalval', 'hyper-dereference an array'); 281 271 282 272 my $part = join '', eval '@array[0,1]>>.<key>'; 283 is($part, 'valval', 'hyper-dereference an array slice' ,:todo);273 is($part, 'valval', 'hyper-dereference an array slice'); 284 274 } 285 275
