Hack of the day: Access private members in unit tests
February 17, 2011
Sometimes it could be very useful to be able to test private members or methods in your unit tests. But how could this be achieved?
In C/C++ you can do this by using a simple macro:
#define protected public #define private public