diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-02 11:22:19 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-08-02 11:22:19 +0000 |
commit | 29fe7a80153b6d2e749a8f652a3275fb1d6538a5 (patch) | |
tree | 0233928a7b241d8f3e1fc28d53fa598d9fabe0cb /t | |
parent | 07158430424a11cb0012fe315b790bd28b8a7cf3 (diff) | |
download | perl-29fe7a80153b6d2e749a8f652a3275fb1d6538a5.tar.gz |
Fix printf %D %U %O for quads.
p4raw-id: //depot/cfgperl@3882
Diffstat (limited to 't')
-rw-r--r-- | t/op/64bit.t | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/t/op/64bit.t b/t/op/64bit.t index c8da1cbcdb..f49b5e47f6 100644 --- a/t/op/64bit.t +++ b/t/op/64bit.t @@ -11,7 +11,7 @@ BEGIN { # Nota bene: bit operations are not 64-bit clean. See the beginning # of pp.c and the explanation next to IBW/UBW. -print "1..27\n"; +print "1..30\n"; my $q = 12345678901; my $r = 23456789012; @@ -113,22 +113,35 @@ print "not " unless $x == $q && $x eq $q; print "ok 22\n"; +$x = sprintf("%D", $q); +print "not " unless $x == $q && $x eq $q; +print "ok 23\n"; + +$x = sprintf("%U", $q); +print "not " unless $x == $q && $x eq $q; +print "ok 24\n"; + +$x = sprintf("%O", $q); +print "not " unless oct($x) == $q; +print "ok 25\n"; + + $x = $q + $r; print "not " unless $x == 35802467913; -print "ok 23\n"; +print "ok 26\n"; $x = $q - $r; print "not " unless $x == -11111110111; -print "ok 24\n"; +print "ok 27\n"; $x = $q * $r; print "not " unless $x == 289589985190657035812; -print "ok 25\n"; +print "ok 28\n"; $x /= $r; print "not " unless $x == $q; -print "ok 26\n"; +print "ok 29\n"; $x = 98765432109 % 12345678901; print "not " unless $x == 901; -print "ok 27\n"; +print "ok 30\n"; |