summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-14 19:56:42 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-14 19:56:42 +0000
commit96b96e0098295f23da078cabf7dcf4850b59a331 (patch)
tree36748ea6944560e6ea121e56768c2732d8d0505c
parentedf815fd8adfc467da9836baf8369da56521c606 (diff)
downloadperl-96b96e0098295f23da078cabf7dcf4850b59a331.tar.gz
Better test diagnostics for the numbers tests.
(Failure diagnostics were always good, but now the tests have names, which show even when they pass) p4raw-id: //depot/perl@23805
-rwxr-xr-xt/op/pack.t12
1 files changed, 6 insertions, 6 deletions
diff --git a/t/op/pack.t b/t/op/pack.t
index 2d4f6a3ac1..72ac95b9db 100755
--- a/t/op/pack.t
+++ b/t/op/pack.t
@@ -476,8 +476,8 @@ sub numbers_with_total {
skip "cannot pack '$format' on this perl", 2
if is_valid_error($@);
- is($@, '');
- is($out, $_);
+ is($@, '', "no error");
+ is($out, $_, "unpack pack $format $_");
}
}
@@ -496,8 +496,8 @@ sub numbers_with_total {
skip "cannot pack '$format' on this perl", 3
if is_valid_error($@);
- is($@, '');
- ok(defined $sum);
+ is($@, '', "no error");
+ ok(defined $sum, "sum bits $_, format $format defined");
my $len = $_; # Copy, so that we can reassign ''
$len = 16 unless length $len;
@@ -544,7 +544,7 @@ sub numbers_with_total {
}
if ($calc_sum == $sum) { # HAS to be ==, not eq (so no is()).
- ok ("unpack '%$_$format' gave $sum");
+ pass ("unpack '%$_$format' gave $sum");
} else {
my $delta = 1.000001;
if ($format =~ tr /dDfF//
@@ -559,7 +559,7 @@ sub numbers_with_total {
}
}
}
- }
+ }
}
}