mirror of
https://github.com/boostorg/utility.git
synced 2025-05-09 15:04:00 +00:00
Update Boost.StringRef tests to use newer Boost.Test features
[SVN r82825]
This commit is contained in:
parent
00d151828c
commit
05af0deaed
@ -8,6 +8,11 @@
|
|||||||
# bring in rules for testing
|
# bring in rules for testing
|
||||||
import testing ;
|
import testing ;
|
||||||
|
|
||||||
|
alias unit_test_framework
|
||||||
|
: # sources
|
||||||
|
/boost//unit_test_framework
|
||||||
|
;
|
||||||
|
|
||||||
# Please keep the tests ordered by filename
|
# Please keep the tests ordered by filename
|
||||||
test-suite utility
|
test-suite utility
|
||||||
:
|
:
|
||||||
@ -31,8 +36,8 @@ test-suite utility
|
|||||||
[ run ../ref_test.cpp ../../test/build//boost_test_exec_monitor/<link>static ]
|
[ run ../ref_test.cpp ../../test/build//boost_test_exec_monitor/<link>static ]
|
||||||
[ compile result_of_test.cpp ]
|
[ compile result_of_test.cpp ]
|
||||||
[ run ../shared_iterator_test.cpp ]
|
[ run ../shared_iterator_test.cpp ]
|
||||||
[ run string_ref_test1.cpp ]
|
[ run string_ref_test1.cpp unit_test_framework ]
|
||||||
[ run string_ref_test2.cpp ]
|
[ run string_ref_test2.cpp unit_test_framework ]
|
||||||
[ run ../value_init_test.cpp ]
|
[ run ../value_init_test.cpp ]
|
||||||
[ run ../value_init_workaround_test.cpp ]
|
[ run ../value_init_workaround_test.cpp ]
|
||||||
[ run ../initialized_test.cpp ]
|
[ run ../initialized_test.cpp ]
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
#include <boost/utility/string_ref.hpp>
|
#include <boost/utility/string_ref.hpp>
|
||||||
|
|
||||||
|
#define BOOST_TEST_MAIN
|
||||||
#include <boost/test/included/test_exec_monitor.hpp>
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
typedef boost::string_ref string_ref;
|
typedef boost::string_ref string_ref;
|
||||||
|
|
||||||
@ -94,8 +94,8 @@ const char *test_strings [] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int test_main( int , char* [] ) {
|
BOOST_AUTO_TEST_CASE( test_main )
|
||||||
|
{
|
||||||
const char **p = &test_strings[0];
|
const char **p = &test_strings[0];
|
||||||
|
|
||||||
while ( *p != NULL ) {
|
while ( *p != NULL ) {
|
||||||
@ -106,6 +106,4 @@ int test_main( int , char* [] ) {
|
|||||||
|
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@
|
|||||||
|
|
||||||
#include <boost/utility/string_ref.hpp>
|
#include <boost/utility/string_ref.hpp>
|
||||||
|
|
||||||
#include <boost/test/included/test_exec_monitor.hpp>
|
#define BOOST_TEST_MAIN
|
||||||
|
#include <boost/test/unit_test.hpp>
|
||||||
|
|
||||||
typedef boost::string_ref string_ref;
|
typedef boost::string_ref string_ref;
|
||||||
|
|
||||||
@ -240,7 +241,8 @@ const char *test_strings [] = {
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int test_main( int , char* [] ) {
|
BOOST_AUTO_TEST_CASE( test_main )
|
||||||
|
{
|
||||||
const char **p = &test_strings[0];
|
const char **p = &test_strings[0];
|
||||||
|
|
||||||
while ( *p != NULL ) {
|
while ( *p != NULL ) {
|
||||||
@ -251,6 +253,4 @@ int test_main( int , char* [] ) {
|
|||||||
|
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user