summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2000-12-16 19:03:13 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-19 17:07:45 +0000
commit85b81d9324253120bb12a49711cc05ad5949da8e (patch)
tree922c3c890d3433bf054c8b0e294eeddf67149370 /t
parent490a3f88b970ea21a82a076ce6f1a8dc3b9f7d51 (diff)
downloadperl-85b81d9324253120bb12a49711cc05ad5949da8e.tar.gz
Re: [PATCH] strtoq, strtou(q|ll|l) testing
Message-ID: <20001216190313.D68304@plum.flirble.org> p4raw-id: //depot/perl@8192
Diffstat (limited to 't')
-rw-r--r--t/op/64bitint.t28
1 files changed, 27 insertions, 1 deletions
diff --git a/t/op/64bitint.t b/t/op/64bitint.t
index 88fbc55c67..47779dd058 100644
--- a/t/op/64bitint.t
+++ b/t/op/64bitint.t
@@ -16,7 +16,7 @@ BEGIN {
# 32+ bit integers don't cause noise
no warnings qw(overflow portable);
-print "1..55\n";
+print "1..57\n";
my $q = 12345678901;
my $r = 23456789012;
@@ -294,4 +294,30 @@ $q = 18446744073709551615;
print "# $q ne\n# 18446744073709551615\nnot " unless "$q" eq "18446744073709551615";
print "ok 55\n";
+# Test that sv_2nv then sv_2iv is the same as sv_2iv direct
+# fails if whatever Atol is defined as can't actually cope with >32 bits.
+my $num = 4294967297;
+my $string = "4294967297";
+{
+ use integer;
+ $num += 0;
+ $string += 0;
+}
+if ($num eq $string) {
+ print "ok 56\n";
+} else {
+ print "not ok 56 # \"$num\" ne \"$string\"\n";
+}
+
+# Test that sv_2nv then sv_2uv is the same as sv_2uv direct
+$num = 4294967297;
+$string = "4294967297";
+$num &= 0;
+$string &= 0;
+if ($num eq $string) {
+ print "ok 57\n";
+} else {
+ print "not ok 57 # \"$num\" ne \"$string\"\n";
+}
+
# eof