Added to_string and better comparisons to Boost.StringRef

[SVN r82902]
This commit is contained in:
Marshall Clow
2013-02-15 16:12:30 +00:00
parent e4d622019f
commit 6e2c1b6b53
2 changed files with 71 additions and 6 deletions

View File

@ -118,7 +118,7 @@ void find ( const char *arg ) {
while ( *p && *(p+1)) {
string_ref sr3 ( p, 2 );
string_ref::size_type pos = sr1.find ( sr3 );
BOOST_CHECK ( pos != string_ref::npos && pos <= ( p - arg ));
BOOST_CHECK ( pos != string_ref::npos && pos <= static_cast<string_ref::size_type>( p - arg ));
p++;
}
@ -241,7 +241,7 @@ void find ( const char *arg ) {
}
#if 0
void to_string ( const char *arg ) {
string_ref sr1;
std::string str1;
@ -289,7 +289,6 @@ void compare ( const char *arg ) {
BOOST_CHECK ( str1 <= sr1 );
}
}
#endif
const char *test_strings [] = {
"",
@ -310,8 +309,8 @@ BOOST_AUTO_TEST_CASE( test_main )
ends_with ( *p );
reverse ( *p );
find ( *p );
// to_string ( *p );
// compare ( *p );
to_string ( *p );
compare ( *p );
p++;
}