
"Yann Golanski"
For example: http://www.patmedia.net/~rogeeff/html/utf/user-guide/runtime-config/referenc... In "report_level", the levels are indicated as no, confirm, short and detaled -- the latter should be details.
Actually it's "detailed". Fixed anyway
I am still unclear about the compile flags. I somehow cannot get ride of main in my test code. What would be really useful is an example of use with Makefile/bjam file/Studio files. I can help if you wanted on the *nix side.
Here is the code, with Makefile following...
==== c++ code: working ====
#define BOOST_TEST_DYN_LINK //#define BOOST_TEST_MAIN
#include
#include using namespace boost::unit_test; //! Test assertion, will always return true. void free_test_function( int i, int j ) { BOOST_CHECK( true ); }
//! Main test case. bool init_function( ) { framework::master_test_suite().p_name.value = "unit test"; framework::master_test_suite().add(BOOST_TEST_CASE(boost::bind> (&free_test_function, 1, 1 ))); return true; }
// TODO: How do I get ride of main???... int main( int argc, char* argv[] ) { return ::boost::unit_test::unit_test_main( &init_function, argc, argv ); }
You can't get rid (;)) of he main function in above setup. If you are desire to define init function you will have to define main() s well. The only way to avoid defining main() is to avoid definingthem both. Use auto registration: BOOST_AUTO_TEST_CASE( param_test ) { free_test_function( 1, 1 ); } Gennadiy