15 Sep
2006
15 Sep
'06
4:43 p.m.
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Matt Schuckmann
What I'd like to ask the Boost community about is this: how to go about unit testing private class methods.
Hi, Rather than change the interface of my classes to use friend classes (I feel this unnecessarily clutters the interface), I do something simple and evil: #define private public #define protected public # include "MyClass.hpp" #undef private #undef protected Or something along those lines. This is permissable in unit tests, I would think. Sohail