Hi David,
I would like to make sure I'm heading in the right direction with the tests and have a few questions which I've compiled below:
First of all generally speaking:
I've taken the approach: if a declaration is defined in the header file then I'll aim to write tests for it, if it makes sense to do so. Is this the right approach? Or is the aim to isolate and test as much of the code as possible (including non-exposed declarations)?
Is there anything else you had in mind for the tests in general?
common/config-file tests:
I have a single test for config_file_read which tests the behaviour when there is no config file given. Does it make sense to take this further and setup fixtures to test different config files on disk, for example an empty config file, bad config file, etc?
common/socks5 tests:
At this point it is a little unclear on the best approach to test this. What are the requirements for adequately testing the socks5 subsystem?
A few of my thoughts are:
* Unit tests with mocks/stubs to help isolate things * Integration tests similar to the dns tests * A combination of the above * Something else I've missed?
lib/* tests:
These seem similar to the socks5 tests above, does this sound right? Is there anything obvious that we should not be testing or want to avoid with the tests?
regards,
Luke
On 6/09/13 10:14 AM, David Goulet wrote:
Sure and please don't hesitate to ask any questions or any comments!
You can find me on IRC if you'll like to discuss things.
Cheers! David