How do I unit test a protected method in C++?
In Java, I\'d either create the test class in the same package as the class under test or create an anonymous subcla
There's a simple solution in C++ using #define. Just wrap the include of your "ClassUnderTest" like this:
#define protected public #define private public #include #undef protected #undef private
Credit goes to this article and RonFox