|
Boost Users : |
Subject: Re: [Boost-users] [test] testing protected/private methods out of test suits
From: trashing_at_[hidden]
Date: 2008-09-19 15:37:01
>Hi,
>
>>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.
>
>I don't believe this is true for all compilers or in all cases. For example, >changing the member visibility in a class I worked on broke binary >compatibility in a library I built with MSVC++ 8. Similar complications may >arise when using symbol hiding techniques, such as compiler-specific symbol >visibility support, link scripts, etc
I've exactly that problem with MSVC++7.x. Compiling the class_to_test in the library with protected methods and trying to access this methods out from the test_case_class by including the header and #define protected public, gives me a "symbol not found compiler error". :-/
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