From: Nicholas Clark Date: Tue, 11 Dec 2001 20:08:59 +0000 (+0000) Subject: Re: [PATCH] Re: [PATCH t/op/pack.t] Cleanup X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0dccb3d196f001586f1148d356c0240031948400;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH] Re: [PATCH t/op/pack.t] Cleanup Message-ID: <20011211200859.S21702@plum.flirble.org> p4raw-id: //depot/perl@13629 --- diff --git a/t/op/pack.t b/t/op/pack.t index 75ddd1e..0e05392 100755 --- a/t/op/pack.t +++ b/t/op/pack.t @@ -385,14 +385,13 @@ sub numbers_with_total { $calc_sum = 0; } - if (is( $calc_sum, $sum)) { - print "# unpack '%$_$format' gave $sum\n"; + if ($calc_sum == $sum) { # HAS to be ==, not eq (so no is()). + ok ("unpack '%$_$format' gave $sum"); } else { my $delta = 1.000001; if ($format =~ tr /dDfF// && ($calc_sum <= $sum * $delta && $calc_sum >= $sum / $delta)) { - pass; - print "# unpack '%$_$format' gave $sum, expected $calc_sum\n"; + pass ("unpack '%$_$format' gave $sum, expected $calc_sum"); } else { my $text = ref $total ? &$total($len) : $total; fail;