S
SnaiL
Hi, guys. I am interested in C++ unit testing. I know only two methods
how to test private class methods.
1) Declare friend class in the code. But I don't like this style
because tests depends on the code.
2) Cheat compiler. We can do it by:
#define private public
#include "..."
Okey-dockey, but we can't cheat linker. I'm using VC++ 7.0... and know
that methods with different access have different name in object
file... so, we can compile, but can't link.
Please share your experience, thanks in advance.
how to test private class methods.
1) Declare friend class in the code. But I don't like this style
because tests depends on the code.
2) Cheat compiler. We can do it by:
#define private public
#include "..."
Okey-dockey, but we can't cheat linker. I'm using VC++ 7.0... and know
that methods with different access have different name in object
file... so, we can compile, but can't link.
Please share your experience, thanks in advance.