Changeset 22780 for t

Show
Ignore:
Timestamp:
10/26/08 23:17:24 (2 months ago)
Author:
moritz
Message:

[t/spec] added two bigint tests, slavik++

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • t/spec/S03-operators/arith.t

    r22451 r22780  
    33use Test; 
    44 
    5 plan 190; 
     5plan 192; 
    66 
    77my $five = abs(-5); 
     
    413413dies_ok( { $x = 0; say 3 / $x; }, 'Division by zero dies and is catchable with VInt/VRat variables'); 
    414414dies_ok( { $x := 0; say 3 / $x; }, 'Division by zero dies and is catchable with VRef variables'); 
     415 
     416# This is a rakudo regression wrt bignum: 
     417#?rakudo todo 'bigint' 
     418{ 
     419    my $f = 1; $f *= $_ for 2..25; say $f; 
     420    ok $f == 15511210043330985984000000,  
     421       'Can calcualte 25! without loss of precision'; 
     422    ok 2**65 == 36893488147419103232, 
     423       'Can calcualte 2**65 without loss of precision'; 
     424} 
     425 
     426# vim: ft=perl6