3 ms·
It's kinda useful for testing private functions and accessing private variables during testing. However using something like the `GOOGLE_FRIEND_TEST` marcro in
by en4bz 10y ago
It's kinda useful for testing private functions and accessing private variables during testing. However using something like the `GOOGLE_FRIEND_TEST` marcro in Google Test is probably a better way to get around private functions/members.
- anuragsoni 10y agoWouldn't testing the public interface that calls the private code, be enough in most situations? If they are few and simple I test them indirectly by testing the public interface that makes use of them, otherwise they can factored out to a new class/module where they can be tested directly.