I've always appreciated the value of including 'tests' inside code, even before it was considered 'cool' to do so. Therefore, I'd like to know what is the benefit of using any of the various recommended test modules out there, as opposed to my standard way of doing it. I've glanced at the various modules and I just don't get the point.
Here's an example of what I mean by 'standard way of doing it' ...
### test code #X# <test>no arguments if(000){ print NewSkeletonDoc::FillSkeletonTemplate(); }; #X#</test> #X# <test>arguments with blank values if(000){ print NewSkeletonDoc::FillSkeletonTemplate({basename=>' '}); }; #X#</test> #X# <test>arguments with test values if(000){ print NewSkeletonDoc::FillSkeletonTemplate( { basename=>'foo_file', desc=>'this is the foo desc', sbty=>'perl-based skeleton template' } ); }; #X#</test> ### init package package NewSkeletonDoc; ### ... rest of code goes here
In reply to What is wrong with testing like a noob by dimar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |