Boost C++ Libraries: Ticket #1311: Can't call base members on derived object in unit_test https://svn.boost.org/trac10/ticket/1311 <p> #include &lt;iostream&gt; #include "boost/test/unit_test.hpp" #include "boost/shared_ptr.hpp" # using std::cout; using std::endl; using boost::shared_ptr; using boost::unit_test::test_suite; </p> <p> class <a class="missing wiki">BaseClass</a> { </p> <blockquote> <p> public: </p> <blockquote> <p> void test_me() { cout &lt;&lt; "hello" &lt;&lt; endl; } </p> </blockquote> </blockquote> <p> }; </p> <p> class TestClass:public <a class="missing wiki">BaseClass</a> { </p> <blockquote> <p> public: </p> </blockquote> <p> }; </p> <p> test_suite* init_unit_test_suite( int argc, char* argv[] ) { </p> <blockquote> <p> test_suite* test= BOOST_TEST_SUITE( "Example" ); shared_ptr&lt;<a class="missing wiki">TestClass</a>&gt; instance( new <a class="missing wiki">TestClass</a> ); test-&gt;add( BOOST_CLASS_TEST_CASE( &amp;TestClass::BaseClass::test_me, instance ) ); return test; </p> </blockquote> <p> } /usr/include/boost/test/unit_test_suite.hpp: In function ‘boost::unit_test::test_suite* init_unit_test_suite(int, char<strong>)’: </strong></p> <p> /usr/include/boost/test/unit_test_suite.hpp:220: error: too many arguments to function ‘boost::unit_test::test_case* boost::unit_test::make_test_case(const boost::unit_test::callback0&lt;boost::unit_test::ut_detail::unused&gt;&amp;, boost::unit_test::const_string)’ </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1311 Trac 1.4.3 John Maddock Sat, 10 Nov 2007 17:22:49 GMT component changed; owner set https://svn.boost.org/trac10/ticket/1311#comment:1 https://svn.boost.org/trac10/ticket/1311#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Gennadiy Rozental</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">test</span> </li> </ul> Ticket Gennadiy Rozental Thu, 22 Nov 2007 21:23:12 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1311#comment:2 https://svn.boost.org/trac10/ticket/1311#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> Ticket