The standard practice in the Objective C world has been to follow that laid down in the Java world when it comes to code management. i.e. Your application source code goes in one directory, and your unit test code goes in another.
I've always found this a bit of a pain. Especially as I tend to organise XCode the same way. The issues that annoy me are:
- Having to keep all the various groups in sync in terms of naming, etc.
- Not easily being able to see which classes have matching test classes.
- Having to scroll up and down through hierarchies all the time as I'm bouncing between tests and source.
So I've been thinking - What if I put the test code beside the source code? In the same directory. And in XCode I can then have the test code sitting with the source and easily locate and see the matching classes.
Has anyone tried this? Is it workable? Or is there another solution?