#define BOOST_TEST_NO_MAIN #define BOOST_TEST_ALTERNATIVE_INIT_API #include void method() { BOOST_TEST( true /* test assertion */ ); } bool init() { using boost::unit_test::test_suite; test_suite* ts = BOOST_TEST_SUITE("TTTT"); ts->add(BOOST_TEST_CASE(&method)); ::boost::unit_test::framework::master_test_suite().add( ts ); return true; } int main(int argc, char* argv[]) { using boost::unit_test::test_suite; char* targv[] = {"T"}; int exit_code = ::boost::unit_test::unit_test_main( &init, 1, targv ); return exit_code; }