Better diagnostic in our lightweight is() replacement
[p5sagit/Devel-PeekPoke.git] / t / 03torture.t
index ba674ce..76e2fc3 100644 (file)
@@ -15,6 +15,16 @@ sub is {
       $::TEST_COUNT,
       $_[2] || '',
     );
+    if ($str ne 'ok') {
+      printf STDERR ("# Failed test #%d at %s line %d
+# %s
+#   ne
+# %s
+"       , $::TEST_COUNT, (caller(0))[1,2],
+        , (map { unpack 'H*', $_ } @_[0,1])
+      );
+    }
+
   }
   threads->yield if $INC{'threads.pm'};
 }