Changeset 21156
- Timestamp:
- 07/02/08 02:43:52 (5 months ago)
- Location:
- t
- Files:
-
- 1 added
- 3 modified
-
TASKS (modified) (1 diff)
-
operators/arith.t (modified) (5 diffs)
-
spec/S02-builtin_data_types/range.t (modified) (2 diffs)
-
spec/S03-operators/p5arrow.t (added)
Legend:
- Unmodified
- Added
- Removed
-
t/TASKS
r21114 r21156 19 19 S03 20 20 * tests for cmp() and eqv() methods of objects 21 * test 'Minimal whitespace DWIMmery'. A quick ack indicates that no tests exist to ensure that '@a [$b]' dies.22 21 * test that '@array, *' repeats the final element infinitely 23 22 * tests for other range edgecases -
t/operators/arith.t
r20490 r21156 3 3 use Test; 4 4 5 plan 1 88;5 plan 190; 6 6 7 7 my $five = abs(-5); … … 46 46 } 47 47 } else { 48 my $error = abs($lhs - $rhs) / $lhs; 48 my $error = abs($lhs - $rhs) / $lhs; 49 49 if ($todo) { 50 50 #&ok.nextwith($error <1e-9,$todo ~ " # " ~ $lhs ~ " is close to " ~ $rhs, :todo); … … 314 314 is Inf, Inf; 315 315 is -Inf, -Inf; 316 isnt Inf, -Inf; 317 is -Inf.abs, Inf; 316 318 is Inf+100, Inf; 317 319 is Inf-100, Inf; … … 371 373 is $nan3, NaN, "Inf**NaN"; 372 374 375 =begin pod 376 373 377 =head2 BEHAVIOUR OF DIVISION AND MODULUS WITH ZERO 374 378 … … 379 383 'die' should be non-fatal. 380 384 381 = cut385 =end pod 382 386 383 387 my $x; -
t/spec/S02-builtin_data_types/range.t
r21088 r21156 3 3 use Test; 4 4 5 plan 31; 6 5 plan 39; 7 6 8 7 # basic Range 8 # L<S02/Immutable types/A pair of Ordered endpoints; gens immutables when iterated> 9 9 10 10 my $r = 1..5; … … 76 76 } 77 77 78 # vim:set ft=perl: 78 # infinite range 79 #?rakudo skip '*..* not implemented' 80 { 81 my @inf = *..*; 82 83 is(@inf.shift, -Inf, 'bottom end of *..* is -Inf (1)'); 84 is(@inf.shift, -Inf, 'bottom end of *..* is still -Inf (2)'); 85 86 is(@inf.pop, Inf, 'top end of *..* is Inf (1)'); 87 is(@inf.pop, Inf, 'top end of *..* is still Inf (2)'); 88 89 ok(42 ~~ @inf, 'positive integer matches *..*'); 90 ok(.2 ~~ @inf, 'positive non-int matches *..*'); 91 ok(-2 ~~ @inf, 'negative integer matches *..*'); 92 ok(-.2 ~~ @inf, 'negative non-int matches *..*'); 93 } 94 95 # vim:set ft=perl6
