Don't worry about what other people do. Write as many tests as you need and don't worry too much if you have some extra.
Don't think of tests in terms of lines of code. Test things that do something. Everything that does something gets a test. Test for expected input, unexpected input, and every situation you can think of, even if you think it's trivial.
Use a coverage tool to ensure you test everything.
If you go back and refactor the tests to bring down the line count, great. If not, oh well. Worrying about the line count as the main goal is only going to get in the way of your testing mindset.
If you are still curious, simply download some CPAN modules and look for yourself. :)
brian d foy <firstname.lastname@example.org>
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
Outside of code tags, you may need to use entities for some characters:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||