9 # to locate the testing files
10 my $location = $0; $location =~ s/constant.t//i;
13 # testing with the core distribution
16 unshift @INC, qw(../lib);
21 unshift @INC, File::Spec->catdir(File::Spec->updir, $location);
25 unshift @INC, $location;
27 print "# INC = @INC\n";
32 use Math::BigInt ':constant';
34 ok (2 ** 255,'57896044618658097711785492504343953926634992332820282019728792003956564819968');
37 no warnings 'portable'; # protect against "non-portable" warnings
38 # hexadecimal constants
39 ok (0x123456789012345678901234567890,
40 Math::BigInt->new('0x123456789012345678901234567890'));
42 ok (0b01010100011001010110110001110011010010010110000101101101,
44 '0b01010100011001010110110001110011010010010110000101101101'));
47 use Math::BigFloat ':constant';
48 ok (1.0 / 3.0, '0.3333333333333333333333333333333333333333');
50 # stress-test Math::BigFloat->import()
52 Math::BigFloat->import( qw/:constant/ );
55 Math::BigFloat->import( qw/:constant upgrade Math::BigRat/ );
58 Math::BigFloat->import( qw/upgrade Math::BigRat :constant/ );