Strangely, the test application works just fine in the debug build but crasches upon startup in the release build (Access violation reading location 0x00000000007447e8). I'm using Visual Studio 2010 on Windows 7 (64-bit) and Pass the following defines to the compiler: BOOST_ALL_NO_LIB,BOOST_ALL_DYN_LINK.
#define BOOST_TEST_MAIN
#define BOOST_TEST_MODULE MyTest
#include <boost/test/unit_test.hpp>
#include <iostream>
int add( int i, int j ) { return i+j; }
BOOST_AUTO_TEST_CASE( my_test )
{
BOOST_CHECK( add( 2,2 ) == 4 );
}
Aucun commentaire:
Enregistrer un commentaire