Boost logo

Boost Users :

Subject: Re: [Boost-users] [test] testing protected/private methods out of test suits
From: Robert Mecklenburg (rmecklenburg_at_[hidden])
Date: 2008-09-19 12:22:05


M. Siebeneicher writes:
> > #define private public
> > #define protected public
>
> I did this before but now it doesn't work 'cause the class_to_test
> lies in another library than the test_case_class.

I'm not sure I understand the problem. This hack works regardless of
the library decomposition. Visibility is purely a source-code
concern, just include #defines and the header declaring the class and
you can access anything even if it is in a different library.

Cheers,

-- 
Robert

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net