Re: Unit testing
"Tor Edvardsson @ Pike importm?te f?r mailinglistan" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Martin, Thank you for the feedback! I have no idea how the -x Tools works internally, but it sound like a great idea. Can you hook into the -x Tools from outisde? Like how you can add plugins to git without extending git. Or do you need to ship your tool with Pike? And a good question on the naming convention. At the moment you can name your test methods with an underscore like test_foo becaue angler looks for test* A quick look how other common frameworks do it JUnit Method name whatever but annotate the test with @Test PHP Unit: method named test* Python unit testing method named test* Perl Test class method named whatever but with attribute Test C++ Qt private slots named whatever Ruby Unit method named test* However many communities seems out of convetion use test_*, like python, ruby and somtimes php (depending if you are "Java-PHP" coder or a "C-PHP" coder) and I guess that has to do with if that language coding convention is snake case or camel case. For Pike that would be snake case then, i.e test_* All frameworks refers to the test method in the report to its full name regardless of any forced prefix, so testfoo is reported as testfoo and test_foo as test_foo and not only foo. So the question is, should the framework force test_* or should it be convention? / Tor Edvardsson