in reply to writing tests on modules
First of all, welcome to the wonderful world of testing! I recently started writing tests for my modules, and I'm hooked. :-)
References you might find helpful:
Relevant nodes found by Super Search (this is one of your best friends at Perl Monks):
Finally, don't forget to search CPAN:
Your specific example of a function that checks bounds is certainly something that I would test. It will allow you to easily verify that it is behaving as expected (per the specifications), especially after you tweak the code (anything from a minor change to a complete refactoring).
For example: Does the function handle different types of input appropriately? What should happen if it is passed undef? An integer? A float? Does it work with positive and negative values? An alphanumeric string? A string that contains with special characters? The empty string? What other edge cases are there?
Just some initial thoughts. Hope this helps.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: writing tests on modules
by tphyahoo (Vicar) on Nov 28, 2005 at 11:04 UTC | |
by Smoothhound (Monk) on Nov 29, 2005 at 09:37 UTC |