Closed mizhang closed 7 years ago
lest has no support for directly accessing private or protected members.
You may test :
struct TestClass : TestedClass { using protected_function; };
friend class Tester;
Refrain from doing
#define protected public
#define private public
#include "foo.hpp"
If foo.hpp happens to #include stuff, especially something from std it can easily backfire.
Note: Information obtained from a thread of ACCU.org's accu-general mailing list.
Thanks!! Miya
On Wed, Jun 7, 2017 4:41 PM, Martin Moene notifications@github.com wrote: lest has no support for directly accessing private or protected members.
You may test :
Refrain from doing
If foo.hpp happens to #include stuff, especially something from std it can easily backfire.
Note: Information obtained from a thread of ACCU.org's accu-general mailing list.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
I am new to this test framework. Wondering what is the standard way to access private or protected variables or functions to test in this framework. Didn't find useful results form google, so asking it here.
Thanks a lot!