[Boost-bugs] [Boost C++ Libraries] #1311: Can't call base members on derived object in unit_test

Subject: [Boost-bugs] [Boost C++ Libraries] #1311: Can't call base members on derived object in unit_test
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-10-10 15:07:35


#1311: Can't call base members on derived object in unit_test
-------------------------+--------------------------------------------------
 Reporter: anonymous | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.34.1
 Severity: Showstopper | Keywords:
-------------------------+--------------------------------------------------
 #include <iostream>
 #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;


 class BaseClass
 {
   public:
     void test_me() { cout << "hello" << endl; }
 };

 class TestClass:public BaseClass
 {
   public:
 };

 test_suite* init_unit_test_suite( int argc, char* argv[] )
 {

   test_suite* test= BOOST_TEST_SUITE( "Example" );
   shared_ptr<TestClass> instance( new TestClass );
   test->add( BOOST_CLASS_TEST_CASE( &TestClass::BaseClass::test_me,
 instance ) );
   return test;
 }

 /usr/include/boost/test/unit_test_suite.hpp: In function
 â€˜boost::unit_test::test_suite* init_unit_test_suite(int, char**)’:

 /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<boost::unit_test::ut_detail::unused>&,
 boost::unit_test::const_string)’

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1311>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:56 UTC