Re: Unit testing
Martin Bähr <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Excerpts from Sup Auto-generated Fake Sender's message of 2014-10-17 10:30:02 +0200: > Thanks. Yes, I started rolling my own framrwork. I have never done a unit testing framework before and I'm not an expert on unit testing either, but here is a start > > https://github.com/tored/angler very nice! this currently requires knowing where angler.pike is located. if it is added in the Tools module, then it can be run as pike -x angler from anywhere. > Each pike file is a test suite. Each method within a test suite that begins > with the word test is considered a unit test. It can run against multiple > folders with many test suites within them. somehow i'd prefer the prefix to be test_, that's easier to see, especially if the test is for a function that starts with lower case. a test for foo() would be called testfoo() (and not testFoo, because Foo might be something else) so test_foo() would work better. and even if test_SomeCamelCaseItem looks like mixing styles, it makes the test part standout, and more visible what is being tested. test_ is also easier to grep for. greetings, martin. -- eKita - the online platform for your entire academic life -- chief engineer eKita.co pike programmer pike.lysator.liu.se caudium.net societyserver.org BLUG secretary beijinglug.org foresight developer foresightlinux.org realss.com unix sysadmin Martin Bähr working in china http://societyserver.org/mbaehr/