Subject: Re: Bad test functions in Test::Exception
From: Nadim Khemir <[EMAIL PROTECTED]>
Date: Tue, 30 Jan 2007 20:48:55 +0100

}> And finally, what if I truly don't care why something dies, just that it
}> did?  Why should I be penalized for writing *any* test?
}
}And how would what I suggest penalize, which is a rather strong umplesant
}word, you?

Because instead of doing dies_ok(), your changes would force me to use
throw_ok(), which would require me either doing more work to determine
what the proper death message is (which I may not have if I'm doing TDD)
or doing the check I showed at the end of my last mail, which is a very
bad test.  Either way, it's more work, and by definition, that's a
penalty.

}You, in the first paragraph above, write that I didn't test enough (I didn't
}test properly, which is different), so testing with dies_ok is not enough.

No, I said you didn't write a test "as complete as you could have".  You   
tested one facet of your interface (the death part) but you didn't test   
another (the message that came back).  "Properly" is in the eye of the    
beholder.
 
}pitty, I think most of us would benefit of good real life examples. Examples
}that can be put in documentation.
 
Sure, but not at the expense of my job.
   
}PBP? I didn't name PBP but if Test::Exception is named there and you would
}like to give a different opinion, I'll be very happy to listen.

I used PBP because I know you're familiar with it, due to your release of 
Carp::Diagnostics.  My point was that having coding standards is one 
thing; asking other people to remove their code to meet standards you have 
is another entirely.

-Pete K
-- 
Pete Krawczyk
  perl at bsod dot net

Reply via email to