Re: Changes to Testcase generator
| From: | zoe | Date: | Sun, 13 Apr 2008 11:00:15 +0000 |
| Subject: | Re: Changes to Testcase generator | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64177@lists.php.net to get a copy of this message | ||
Josie Messa wrote:
Hi, As I mentioned earlier these are the changes that I usually end up making to the tests created by the test case generator, if you have time would be great if they could get changed! This script really needs a complete re-write in PHP5 - it's suffered from being glued together from pieces that Raghu and I both wrote. A re-design is on my to-do list - but currently not close to the top :-). Of course if anyone else felt creative (maybe even as part of the TestFest activity?) someone who is a better PHP programmer than I am would likely do a better job :-)
All Tests: In the prototype: remove the word "proto" from the start done
add dollar signs to the argument name, e.g. array arr1 becomes array $arr1 If there is no alias to the function then delete the "Alias to:" line Not done either of these. The first because it's hard to do, the second because I don't see any harm in just leaving it blank.
Remove echo "Done"; and the new line before it and put ===DONE=== after the closing tag (before the EXPECTF/CLEAN section) done
Basic: Don't have an "add comment here to say what the test is supposed to do" line. done
Variation: Not numbered (i.e. array_diff_variation.phpt) : Title should be Test <<<function name>>> function : usage variations First echo statement should also say usage variations instead of variation. Not done yet - but will do.
I'm using the following for generic (numbered variations, i.e. array_diff_variation1.phpt) variation tests: http://www.pastebin.ca/979401 Yes - this looks good and I will do it.
Optional: (I'm not that fussed about these but would be neat if you could do something!) If changing the scripts to use ===DONE===, maybe the EXPECTF should reflect that? In the prototype when an undefined number of arguments can be used "..." is used as the argument name, this then causes a variable called $... to be generated. Was wondering if there was anyway of renaming this? Also this should trigger the error test case to not try to pass too many parameters to the function Not looked at yet - should be just another regex :-( to stop it generating variables. Not sure about the rest yet.Zoe