[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[PATCH] Precedence nit in Test::Builder



Fighting to make the NOT optimization better, I stumbled upon a little
precedence nit in Test::Builder which hides an error message (yes, this
means I made something very wrong with my experiments :).

V.
--- lib/Test/Builder.pm	2008-04-15 16:52:45.000000000 +0200
+++ lib/Test/Builder.pm	2008-08-29 18:18:12.000000000 +0200
@@ -1652,7 +1652,7 @@
     my $self = shift;
 
     $self->_whoa($self->{Curr_Test} < 0,  'Says here you ran a negative number of tests!');
-    $self->_whoa(!$self->{Have_Plan} and $self->{Curr_Test}, 
+    $self->_whoa(!$self->{Have_Plan} && $self->{Curr_Test}, 
           'Somehow your tests ran without a plan!');
     $self->_whoa($self->{Curr_Test} != @{ $self->{Test_Results} },
           'Somehow you got a different number of results than tests ran!');

Follow-Ups from:
"David Nicol" <davidnicol@gmail.com>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]