I get a compiler warning when using BOOST_CHECK_EQUAL in conjunction with BOOST_AUTO_UNIT_TEST. The code and warning are below. Anyone know what I'm doing to cause the warning?
Environment: Windows XP with MS VS 2003
#define BOOST_AUTO_TEST_MAIN
#include
class MyTest
{
public:
MyTest( int newVal = 3 ) : a (newVal) {}
int GetA() {return(a);}
protected:
int a;
};
MyTest test1;
// _____________________________________
BOOST_AUTO_UNIT_TEST( TestCase1 )
{
int b = test1.GetA();
BOOST_CHECK_EQUAL( b, 1 );
}
The warning is:
c:\Boost\include\boost-1_32\boost\test\detail\wrap_stringstream.hpp(69) : warning C4267: 'argument' : conversion from 'size_t' to 'unsigned int', possible loss of data
c:\Boost\include\boost-1_32\boost\test\test_tools.hpp(435) : see reference to function template instantiation 'boost::basic_wrap_stringstream<CharT> &boost::operator <<(boost::basic_wrap_stringstream<CharT> &,const T &)' being compiled
with
[
CharT=char,
T=size_t
]
m:\jclaybau_InWork_view\CHAMELEON\SoftwareDevelopmentFolder\Source\AM\Test\AMTest\AMTest.cpp(20) : see reference to function template instantiation 'bool boost::test_tools::tt_detail::equal_and_continue_impl(const Left &,const Right &,boost::wrap_stringstream &,boost::test_tools::const_string,size_t,boost::unit_test::log_level,size_t)' being compiled
with
[
Left=int,
Right=int
]