1 #include <ostream> 2 #include <sstream> 3 #include <string> 4 5 #define BOOST_TEST_NO_MAIN 6 #define BOOST_TEST_ALTERNATIVE_INIT_API 7 #include <boost/test/included/unit_test.hpp> 8 my_init_function()9static bool my_init_function() 10 { 11 return true; 12 } 13 X()14void X() 15 { 16 char *apArgVals[] = 17 { 18 "AndroidSDKTest", 19 "--log_level=warning", 20 "--show_progress=yes", 21 0 22 }; 23 int nArgc = 3; 24 ::boost::unit_test::unit_test_main(::my_init_function, nArgc, apArgVals); 25 } 26 main(int argc,char * argv[])27int main(int argc, char *argv[]) 28 { 29 #ifdef CALL_X 30 X(); 31 #else 32 ::boost::unit_test::unit_test_main(::my_init_function, argc, argv); 33 #endif 34 return 0; 35 } 36 37