diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index 4b2d6e0..d597cb8 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -8,6 +8,11 @@ # bring in rules for testing import testing ; +alias unit_test_framework + : # sources + /boost//unit_test_framework + ; + # Please keep the tests ordered by filename test-suite utility : @@ -31,8 +36,8 @@ test-suite utility [ run ../ref_test.cpp ../../test/build//boost_test_exec_monitor/static ] [ compile result_of_test.cpp ] [ run ../shared_iterator_test.cpp ] - [ run string_ref_test1.cpp ] - [ run string_ref_test2.cpp ] + [ run string_ref_test1.cpp unit_test_framework ] + [ run string_ref_test2.cpp unit_test_framework ] [ run ../value_init_test.cpp ] [ run ../value_init_workaround_test.cpp ] [ run ../initialized_test.cpp ] diff --git a/test/string_ref_test1.cpp b/test/string_ref_test1.cpp index 32ff801..7524536 100644 --- a/test/string_ref_test1.cpp +++ b/test/string_ref_test1.cpp @@ -13,8 +13,8 @@ #include - -#include +#define BOOST_TEST_MAIN +#include typedef boost::string_ref string_ref; @@ -94,8 +94,8 @@ const char *test_strings [] = { NULL }; -int test_main( int , char* [] ) { - +BOOST_AUTO_TEST_CASE( test_main ) +{ const char **p = &test_strings[0]; while ( *p != NULL ) { @@ -106,6 +106,4 @@ int test_main( int , char* [] ) { p++; } - - return 0; - } +} diff --git a/test/string_ref_test2.cpp b/test/string_ref_test2.cpp index dbd5bf9..67733ee 100644 --- a/test/string_ref_test2.cpp +++ b/test/string_ref_test2.cpp @@ -12,7 +12,8 @@ #include -#include +#define BOOST_TEST_MAIN +#include typedef boost::string_ref string_ref; @@ -240,7 +241,8 @@ const char *test_strings [] = { NULL }; -int test_main( int , char* [] ) { +BOOST_AUTO_TEST_CASE( test_main ) +{ const char **p = &test_strings[0]; while ( *p != NULL ) { @@ -251,6 +253,4 @@ int test_main( int , char* [] ) { p++; } - - return 0; - } +}