From: Nicholas Clark Date: Fri, 14 Jan 2005 19:56:42 +0000 (+0000) Subject: Better test diagnostics for the numbers tests. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=96b96e0098295f23da078cabf7dcf4850b59a331;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/t/op/pack.t b/t/op/pack.t index 2d4f6a3..72ac95b 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 { } } } - } + } } }