summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-01-07 19:47:14 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-01-12 05:48:55 +0000
commitbd658be6f5472adcfa4685206ae42aa80964c3d3 (patch)
treecdc1bfb98b4a374adfcb93b726116888a764b332 /t
parent645f760415037835427326a63ea2418cd44ad456 (diff)
downloadperl-bd658be6f5472adcfa4685206ae42aa80964c3d3.tar.gz
Re: [ID 20010101.004] Not OK: perl v5.7.0 +DEVEL8268 on i586-linux-64int-ld 2.2.17-21mdk (UNINSTALLED)
Message-ID: <20010107194714.B1048@plum.flirble.org> p4raw-id: //depot/perl@8410
Diffstat (limited to 't')
-rwxr-xr-xt/op/numconvert.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/t/op/numconvert.t b/t/op/numconvert.t
index 3db280bbfd..e4724b6670 100755
--- a/t/op/numconvert.t
+++ b/t/op/numconvert.t
@@ -95,6 +95,15 @@ print "# @list\n";
my $max_uv_pp = "$max_uv"; $max_uv_pp++;
my $max_uv_p1 = "$max_uv"; $max_uv_p1+=0; $max_uv_p1++;
+# Also need to cope with %g notation for max_uv_p1 that actually gives an
+# integer less than max_uv because of correct rounding for the limited
+# precisision. This bites for 12 byte long doubles and 8 byte UVs
+
+my $temp = $max_uv_p1;
+my $max_uv_p1_as_iv;
+{use integer; $max_uv_p1_as_iv = 0 + sprintf "%s", $temp}
+my $max_uv_p1_as_uv = 0 | sprintf "%s", $temp;
+
my @opnames = split //, "-+UINPuinp";
# @list = map { 2->($_), 3->($_), 4->($_), 5->($_), } @list; # Prepare input
@@ -193,6 +202,15 @@ for my $num_chain (1..$max_chain) {
# string ++ versus numeric ++. Tolerate this little
# bit of insanity
print "# ok, as string ++ of max_uv is \"$max_uv_pp\", numeric is $max_uv_p1\n"
+ } elsif ($opnames[$last] eq 'I' and $ans[1] eq "-1"
+ and $ans[0] eq $max_uv_p1_as_iv) {
+ print "# ok, \"$max_uv_p1\" correctly converts to IV \"$max_uv_p1_as_iv\"\n";
+ } elsif ($opnames[$last] eq 'U' and $ans[1] eq ~0
+ and $ans[0] eq $max_uv_p1_as_uv) {
+ print "# ok, \"$max_uv_p1\" correctly converts to UV \"$max_uv_p1_as_uv\"\n";
+ } elsif (grep {/^N$/} @opnames[@{$curops[0]}]
+ and $ans[0] == $ans[1] and $ans[0] <= ~0) {
+ print "# ok, numerically equal - notation changed due to adding zero\n";
} else {
$nok++,
}