Problems? Is your data what you think it is? | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
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.
In reply to Re: writing tests on modules
by bobf
|
|