X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2F64bitint.t;h=88fbc55c671283f12c86bae6ac814a271109053e;hb=22d4bb9ccb8701e68f9243547d7e3a3c55f70908;hp=691d44e2402d1f99121e71f658c092be886aaa3f;hpb=4b19af017623bfa3bb72bb164598a517f586e0d3;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/64bitint.t b/t/op/64bitint.t index 691d44e..88fbc55 100644 --- a/t/op/64bitint.t +++ b/t/op/64bitint.t @@ -3,11 +3,11 @@ BEGIN { eval { my $q = pack "q", 0 }; if ($@) { - print "1..0\n# no 64-bit types\n"; + print "1..0\n# Skip: no 64-bit types\n"; exit(0); } chdir 't' if -d 't'; - unshift @INC, '../lib'; + @INC = '../lib'; } # This could use many more tests. @@ -16,7 +16,7 @@ BEGIN { # 32+ bit integers don't cause noise no warnings qw(overflow portable); -print "1..52\n"; +print "1..55\n"; my $q = 12345678901; my $r = 23456789012; @@ -220,7 +220,7 @@ if ($^O ne 'unicos') { # especially if operating near the UV/IV limits the low-order bits # become mangled even by simple arithmetic operations. for (23..37) { - print "ok #_ # skipped: too imprecise numbers\n"; + print "ok $_ # skipped: too imprecise numbers\n"; } } @@ -279,4 +279,19 @@ print "ok 51\n"; print "not " unless (sprintf "%u", ~0) eq '18446744073709551615'; print "ok 52\n"; +# If the 53..55 fail you have problems in the parser's string->int conversion, +# see toke.c:scan_num(). + +$q = -9223372036854775808; +print "# $q ne\n# -9223372036854775808\nnot " unless "$q" eq "-9223372036854775808"; +print "ok 53\n"; + +$q = 9223372036854775807; +print "# $q ne\n# 9223372036854775807\nnot " unless "$q" eq "9223372036854775807"; +print "ok 54\n"; + +$q = 18446744073709551615; +print "# $q ne\n# 18446744073709551615\nnot " unless "$q" eq "18446744073709551615"; +print "ok 55\n"; + # eof