Are there conventions for function names when using the Perl Test::More or Test::Simple modules?
I’m specifically asking about the names of functions that are used to set up a test environment before the test and to tear down the environment after successful completion of the test(s).
cheers,
Rob
I dont think there are any such conventions out there.
The only way you can do it is perhaps use BEGIN/END blocks, if the resources are to be used over the whole file.
The general approach I take is to put related tests in one code block and then initialize the variables/resource etc there. You can perhaps keep an easy count of how many tests you have for each function.
Something like …
On other note, you may want to read this for testing in perl … http://perlandmac.blogspot.com/2007/08/using-perl-testsimple-and-testmore.html