
22 Dec
2011
22 Dec
'11
9:05 p.m.
On 12/22/2011 12:25 AM, Chris Cleeland wrote:
I'm using the boost unit test framework to implement unit tests for code. I'm wondering if there is a best-practice for doing white-box testing/internal state inspection of types under test. My hack right now is to strip out "protected" and "private" from the header, but I hold my nose as I do that.
Thoughts/suggestions?
There are tricks to access private/protected members of a class without being a friend or anything like that. http://bloglitb.blogspot.com/2010/07/access-to-private-members-thats-easy.ht... Maybe that would be useful to you (haven't found a use for that yet)