summaryrefslogtreecommitdiff
path: root/t/base
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-07 22:54:57 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-07 22:54:57 +0000
commitbb7cd144522bb29ef145d3533b366a1934b911ea (patch)
treec2521aa2e6073cb7525950d90c79d77545913141 /t/base
parent925fa5a876ae65e605ff8becef8ac0c232c8148f (diff)
downloadperl-bb7cd144522bb29ef145d3533b366a1934b911ea.tar.gz
In case of failure be more verbose.
p4raw-id: //depot/perl@14591
Diffstat (limited to 't/base')
-rw-r--r--t/base/num.t61
1 files changed, 31 insertions, 30 deletions
diff --git a/t/base/num.t b/t/base/num.t
index 689968bb19..b3cde2e866 100644
--- a/t/base/num.t
+++ b/t/base/num.t
@@ -6,49 +6,49 @@ print "1..30\n";
# (Testing with == would exercize the IV/NV part, not the PV.)
$a = 1; "$a";
-print $a eq "1" ? "ok 1\n" : "not ok 1\n";
+print $a eq "1" ? "ok 1\n" : "not ok 1 # $a\n";
$a = -1; "$a";
-print $a eq "-1" ? "ok 2\n" : "not ok 2\n";
+print $a eq "-1" ? "ok 2\n" : "not ok 2 # $a\n";
$a = 1.; "$a";
-print $a eq "1" ? "ok 3\n" : "not ok 3\n";
+print $a eq "1" ? "ok 3\n" : "not ok 3 # $a\n";
$a = -1.; "$a";
-print $a eq "-1" ? "ok 4\n" : "not ok 4\n";
+print $a eq "-1" ? "ok 4\n" : "not ok 4 # $a\n";
$a = 0.1; "$a";
-print $a eq "0.1" ? "ok 5\n" : "not ok 5\n";
+print $a eq "0.1" ? "ok 5\n" : "not ok 5 # $a\n";
$a = -0.1; "$a";
-print $a eq "-0.1" ? "ok 6\n" : "not ok 6\n";
+print $a eq "-0.1" ? "ok 6\n" : "not ok 6 # $a\n";
$a = .1; "$a";
-print $a eq "0.1" ? "ok 7\n" : "not ok 7\n";
+print $a eq "0.1" ? "ok 7\n" : "not ok 7 # $a\n";
$a = -.1; "$a";
-print $a eq "-0.1" ? "ok 8\n" : "not ok 8\n";
+print $a eq "-0.1" ? "ok 8\n" : "not ok 8 # $a\n";
$a = 10.01; "$a";
-print $a eq "10.01" ? "ok 9\n" : "not ok 9\n";
+print $a eq "10.01" ? "ok 9\n" : "not ok 9 # $a\n";
$a = 1e3; "$a";
-print $a eq "1000" ? "ok 10\n" : "not ok 10\n";
+print $a eq "1000" ? "ok 10\n" : "not ok 10 # $a\n";
$a = 10.01e3; "$a";
-print $a eq "10010" ? "ok 11\n" : "not ok 11\n";
+print $a eq "10010" ? "ok 11\n" : "not ok 11 # $a\n";
$a = 0b100; "$a";
-print $a eq "4" ? "ok 12\n" : "not ok 12\n";
+print $a eq "4" ? "ok 12\n" : "not ok 12 # $a\n";
$a = 0100; "$a";
-print $a eq "64" ? "ok 13\n" : "not ok 13\n";
+print $a eq "64" ? "ok 13\n" : "not ok 13 # $a\n";
$a = 0x100; "$a";
-print $a eq "256" ? "ok 14\n" : "not ok 14\n";
+print $a eq "256" ? "ok 14\n" : "not ok 14 # $a\n";
$a = 1000; "$a";
-print $a eq "1000" ? "ok 15\n" : "not ok 15\n";
+print $a eq "1000" ? "ok 15\n" : "not ok 15 # $a\n";
# Okay, now test the numerics.
# We may be assuming too much, given the painfully well-known floating
@@ -56,46 +56,47 @@ print $a eq "1000" ? "ok 15\n" : "not ok 15\n";
# assumptions which if not working would confuse people quite badly.
$a = 1; "$a"; # Keep the stringification as a potential troublemaker.
-print $a + 1 == 2 ? "ok 16\n" : "not ok 16\n";
+print $a + 1 == 2 ? "ok 16\n" : "not ok 16 #" . $a + 1 . "\n";
+# Don't know how useful printing the stringification of $a + 1 really is.
$a = -1; "$a";
-print $a + 1 == 0 ? "ok 17\n" : "not ok 17\n";
+print $a + 1 == 0 ? "ok 17\n" : "not ok 17 #" . $a + 1 . "\n";
$a = 1.; "$a";
-print $a + 1 == 2 ? "ok 18\n" : "not ok 18\n";
+print $a + 1 == 2 ? "ok 18\n" : "not ok 18 #" . $a + 1 . "\n";
$a = -1.; "$a";
-print $a + 1 == 0 ? "ok 19\n" : "not ok 19\n";
+print $a + 1 == 0 ? "ok 19\n" : "not ok 19 #" . $a + 1 . "\n";
$a = 0.1; "$a";
-print $a + 1 == 1.1 ? "ok 20\n" : "not ok 20\n";
+print $a + 1 == 1.1 ? "ok 20\n" : "not ok 20 #" . $a + 1 . "\n";
$a = -0.1; "$a";
-print $a + 1 == 0.9 ? "ok 21\n" : "not ok 21\n";
+print $a + 1 == 0.9 ? "ok 21\n" : "not ok 21 #" . $a + 1 . "\n";
$a = .1; "$a";
-print $a + 1 == 1.1 ? "ok 22\n" : "not ok 22\n";
+print $a + 1 == 1.1 ? "ok 22\n" : "not ok 22 #" . $a + 1 . "\n";
$a = -.1; "$a";
-print $a + 1 == 0.9 ? "ok 23\n" : "not ok 23\n";
+print $a + 1 == 0.9 ? "ok 23\n" : "not ok 23 #" . $a + 1 . "\n";
$a = 10.01; "$a";
-print $a + 1 == 11.01 ? "ok 24\n" : "not ok 24\n";
+print $a + 1 == 11.01 ? "ok 24\n" : "not ok 24 #" . $a + 1 . "\n";
$a = 1e3; "$a";
-print $a + 1 == 1001 ? "ok 25\n" : "not ok 25\n";
+print $a + 1 == 1001 ? "ok 25\n" : "not ok 25 #" . $a + 1 . "\n";
$a = 10.01e3; "$a";
-print $a + 1 == 10011 ? "ok 26\n" : "not ok 26\n";
+print $a + 1 == 10011 ? "ok 26\n" : "not ok 26 #" . $a + 1 . "\n";
$a = 0b100; "$a";
-print $a + 1 == 0b101 ? "ok 27\n" : "not ok 27\n";
+print $a + 1 == 0b101 ? "ok 27\n" : "not ok 27 #" . $a + 1 . "\n";
$a = 0100; "$a";
-print $a + 1 == 0101 ? "ok 28\n" : "not ok 28\n";
+print $a + 1 == 0101 ? "ok 28\n" : "not ok 28 #" . $a + 1 . "\n";
$a = 0x100; "$a";
-print $a + 1 == 0x101 ? "ok 29\n" : "not ok 29\n";
+print $a + 1 == 0x101 ? "ok 29\n" : "not ok 29 #" . $a + 1 . "\n";
$a = 1000; "$a";
-print $a + 1 == 1001 ? "ok 30\n" : "not ok 30\n";
+print $a + 1 == 1001 ? "ok 30\n" : "not ok 30 #" . $a + 1 . "\n";