diff --git a/test/sv_find_last_not_of_test.cpp b/test/sv_find_last_not_of_test.cpp index b15b3a6..348eb29 100644 --- a/test/sv_find_last_not_of_test.cpp +++ b/test/sv_find_last_not_of_test.cpp @@ -373,6 +373,46 @@ int main() BOOST_TEST_EQ( sv.find_last_not_of( L"123", 7, 3 ), npos ); } + { + boost::core::wstring_view sv( L"\x101\x102\x103\x101\x102\x103" ); + + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 0, 0 ), 0 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 1, 0 ), 1 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 2, 0 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 3, 0 ), 3 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 4, 0 ), 4 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 5, 0 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 6, 0 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 7, 0 ), 5 ); + + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 0, 1 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 1, 1 ), 1 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 2, 1 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 3, 1 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 4, 1 ), 4 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 5, 1 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 6, 1 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 7, 1 ), 5 ); + + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 0, 2 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 1, 2 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 2, 2 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 3, 2 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 4, 2 ), 2 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 5, 2 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 6, 2 ), 5 ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 7, 2 ), 5 ); + + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 0, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 1, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 2, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 3, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 4, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 5, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 6, 3 ), npos ); + BOOST_TEST_EQ( sv.find_last_not_of( L"\x101\x102\x103", 7, 3 ), npos ); + } + { boost::core::string_view sv( "123a123B123c" );