Re:Tim Bray doesn't know operator precedence rules
by loumf on Wednesday June 30, 2010 @07:19AM
(#1474479)
I've used it for unit-testing -- gives the test class a little more access.
[ Parent
| on HN ]
Re:Tim Bray doesn't know operator precedence rules
by thomas11 on Wednesday June 30, 2010 @07:54AM
(#1474543)
Exactly. To elaborate a bit for those who never used it in that way: you want to separate your unit tests from your app code. But you still want to give your tests access to non-public methods in order to test them independently. The solution is to put app code and tests in different folders, but in the same packages, and make everything you want to test package-scoped.