Re: [PATCH] Re: [PATCH t/op/pack.t] Cleanup
Nicholas Clark [Tue, 11 Dec 2001 20:08:59 +0000 (20:08 +0000)]
Message-ID: <20011211200859.S21702@plum.flirble.org>

p4raw-id: //depot/perl@13629

t/op/pack.t

index 75ddd1e..0e05392 100755 (executable)
@@ -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;