Boost logo

Boost Users :

From: Pete Cilliers (pete.cilliers_at_[hidden])
Date: 2004-05-21 08:30:03


Hi

I am having problems running on MSVC 7.1 the example given in The
parameterized boost::function based test case
 

#include <boost/test/unit_test_ex.hpp>
using boost::unit_test_framework::test_suite;
#include <boost/bind.hpp>

void test_mask( int arg, int mask )
{
    BOOST_CHECK( (arg & mask) != 0 );
}

struct sub_test_suite : public test_suite {
    sub_test_suite()
    {
                    parameters_list.push_back( 1 );
                                parameters_list.push_back( 5 );
                                parameters_list.push_back( 6 );
                                parameters_list.push_back( 7 );
                                parameters_list.push_back( 15 );

        add( BOOST_PARAM_TEST_CASE( bind( &test_mask, _1, 0x80 ),
parameters_list.begin(), parameters_list.end() ) ) );
    }

    std::list<int> parameters_list;
}
//__________________________________________________________________________
__//
test_suite*
init_unit_test_suite( int argc, char* argv[] ) {
    test_suite* test = BOOST_TEST_SUITE( "Example" );

    test->add( new sub_test_suite );

    return test;
}

I get the following error:

error C2661: 'boost::unit_test_framework::create_test_case' : no overloaded
function takes 4 arguments

I have had to make a number of changes to the example to correct typo's but
the example given here is as it appears in the documentation. Has anyone
experienced the same type of problem and can you please advise on how to
correct?

Thanks

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

**********************************************************************


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