mirror of
https://github.com/boostorg/core.git
synced 2025-11-28 21:30:09 +01:00
Sync from upstream.
This commit is contained in:
@@ -25,6 +25,15 @@ local warnings-as-errors-off =
|
||||
"-<toolset>gcc:<warnings-as-errors>on"
|
||||
"-<toolset>clang:<warnings-as-errors>on" ;
|
||||
|
||||
local pedantic-errors = <warnings>pedantic
|
||||
<toolset>gcc:<cxxflags>"-Wconversion"
|
||||
<toolset>gcc:<cxxflags>"-Wsign-conversion"
|
||||
<toolset>clang:<cxxflags>"-Wconversion"
|
||||
<toolset>clang:<cxxflags>"-Wsign-conversion"
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on ;
|
||||
|
||||
# quick test (for CI)
|
||||
run quick.cpp ;
|
||||
|
||||
@@ -37,7 +46,8 @@ compile addressof_constexpr_test.cpp ;
|
||||
compile-fail addressof_fail_rvalue.cpp
|
||||
: $(warnings-as-errors-off) ;
|
||||
|
||||
run checked_delete_test.cpp ;
|
||||
run checked_delete_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
compile-fail checked_delete_fail.cpp
|
||||
: $(warnings-as-errors-off) ;
|
||||
compile-fail checked_delete_fail2.cpp
|
||||
@@ -104,13 +114,6 @@ run visit_each_test.cpp ;
|
||||
|
||||
run get_pointer_test.cpp ;
|
||||
|
||||
local pedantic-errors = <warnings>pedantic
|
||||
<toolset>gcc:<cxxflags>"-Wconversion"
|
||||
<toolset>clang:<cxxflags>"-Wconversion"
|
||||
<toolset>msvc:<warnings-as-errors>on
|
||||
<toolset>gcc:<warnings-as-errors>on
|
||||
<toolset>clang:<warnings-as-errors>on ;
|
||||
|
||||
run lightweight_test_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run lightweight_test_test.cpp : : :
|
||||
@@ -337,33 +340,51 @@ run type_name_test.cpp ;
|
||||
|
||||
run snprintf_test.cpp ;
|
||||
|
||||
run sv_types_test.cpp ;
|
||||
run sv_construct_test.cpp ;
|
||||
run sv_iteration_test.cpp ;
|
||||
run sv_element_access_test.cpp ;
|
||||
run sv_modifiers_test.cpp ;
|
||||
run sv_copy_test.cpp ;
|
||||
run sv_substr_test.cpp ;
|
||||
run sv_compare_test.cpp ;
|
||||
run sv_starts_with_test.cpp ;
|
||||
run sv_ends_with_test.cpp ;
|
||||
run sv_find_test.cpp ;
|
||||
run sv_rfind_test.cpp ;
|
||||
run sv_types_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_construct_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_iteration_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_element_access_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_modifiers_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_copy_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_substr_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_compare_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_starts_with_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_ends_with_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_find_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_rfind_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_find_first_of_test.cpp
|
||||
: : : <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
: : : $(pedantic-errors) <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
run sv_find_last_of_test.cpp
|
||||
: : : <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
: : : $(pedantic-errors) <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
run sv_find_first_not_of_test.cpp
|
||||
: : : <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
: : : $(pedantic-errors) <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
run sv_find_last_not_of_test.cpp
|
||||
: : : <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
run sv_contains_test.cpp ;
|
||||
run sv_eq_test.cpp ;
|
||||
run sv_lt_test.cpp ;
|
||||
run sv_stream_insert_test.cpp ;
|
||||
run sv_conversion_test.cpp ;
|
||||
run sv_conversion_test2.cpp /boost/utility//boost_utility : ;
|
||||
run sv_common_reference_test.cpp ;
|
||||
: : : $(pedantic-errors) <toolset>gcc-4.4:<cxxflags>-Wno-type-limits ;
|
||||
run sv_contains_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_eq_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_lt_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_stream_insert_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_conversion_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
run sv_conversion_test2.cpp : ;
|
||||
run sv_common_reference_test.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
compile sv_common_reference_test2.cpp ;
|
||||
compile sv_windows_h_test.cpp ;
|
||||
compile-fail sv_nullptr_fail.cpp
|
||||
|
||||
@@ -494,7 +494,7 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
str[ i ] = static_cast< unsigned char >( i );
|
||||
str[ i ] = static_cast<char>( static_cast< unsigned char >( i ) );
|
||||
}
|
||||
|
||||
boost::core::string_view sv( str, 256 );
|
||||
@@ -503,22 +503,22 @@ int main()
|
||||
|
||||
std::string str2( sv.data(), sv.size() );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<char>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), i );
|
||||
}
|
||||
|
||||
std::reverse( str, str + 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<char>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), 255 - i );
|
||||
}
|
||||
@@ -538,22 +538,22 @@ int main()
|
||||
|
||||
std::wstring str2( sv.data(), sv.size() );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::wstring str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<wchar_t>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), i );
|
||||
}
|
||||
|
||||
std::reverse( str, str + 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::wstring str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<wchar_t>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), 255 - i );
|
||||
}
|
||||
|
||||
@@ -426,14 +426,14 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
str[ i ] = static_cast< unsigned char >( i );
|
||||
str[ i ] = static_cast<char>( static_cast< unsigned char >( i ) );
|
||||
}
|
||||
|
||||
boost::core::string_view sv( str, 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string needle( 12, static_cast< unsigned char >( i ) );
|
||||
std::string needle( 12, static_cast<char>( static_cast< unsigned char >( i ) ) );
|
||||
BOOST_TEST_EQ( sv.find_first_of( needle ), i );
|
||||
}
|
||||
|
||||
@@ -441,7 +441,7 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string needle( 12, static_cast< unsigned char >( i ) );
|
||||
std::string needle( 12, static_cast<char>( static_cast< unsigned char >( i ) ) );
|
||||
BOOST_TEST_EQ( sv.find_first_of( needle ), 255 - i );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -494,7 +494,7 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
str[ i ] = static_cast< unsigned char >( i );
|
||||
str[ i ] = static_cast<char>( static_cast< unsigned char >( i ) );
|
||||
}
|
||||
|
||||
boost::core::string_view sv( str, 256 );
|
||||
@@ -503,22 +503,22 @@ int main()
|
||||
|
||||
std::string str2( sv.data(), sv.size() );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<char>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_last_not_of( str3 ), i );
|
||||
}
|
||||
|
||||
std::reverse( str, str + 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<char>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_last_not_of( str3 ), 255 - i );
|
||||
}
|
||||
@@ -538,22 +538,22 @@ int main()
|
||||
|
||||
std::wstring str2( sv.data(), sv.size() );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::wstring str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<wchar_t>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), i );
|
||||
}
|
||||
|
||||
std::reverse( str, str + 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
for( std::size_t i = 0; i < 256; ++i )
|
||||
{
|
||||
std::wstring str3( str2 );
|
||||
|
||||
str3[ i ] = ~str3[ i ];
|
||||
str3[ i ] = static_cast<wchar_t>( ~str3[ i ] );
|
||||
|
||||
BOOST_TEST_EQ( sv.find_first_not_of( str3 ), 255 - i );
|
||||
}
|
||||
|
||||
@@ -444,14 +444,14 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
str[ i ] = static_cast< unsigned char >( i );
|
||||
str[ i ] = static_cast<char>( static_cast< unsigned char >( i ) );
|
||||
}
|
||||
|
||||
boost::core::string_view sv( str, 256 );
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string needle( 12, static_cast< unsigned char >( i ) );
|
||||
std::string needle( 12, static_cast<char>( static_cast< unsigned char >( i ) ) );
|
||||
BOOST_TEST_EQ( sv.find_last_of( needle ), i );
|
||||
}
|
||||
|
||||
@@ -459,7 +459,7 @@ int main()
|
||||
|
||||
for( int i = 0; i < 256; ++i )
|
||||
{
|
||||
std::string needle( 12, static_cast< unsigned char >( i ) );
|
||||
std::string needle( 12, static_cast<char>( static_cast< unsigned char >( i ) ) );
|
||||
BOOST_TEST_EQ( sv.find_last_of( needle ), 255 - i );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user