Home | Info | Community | Development | myReactOS | Contact Us
[protected]
Definition at line 760 of file string_test.cpp.
{ // 21.3.6.2 string s("one two three one two three"); CPPUNIT_ASSERT( s.rfind("two") == 18 ); CPPUNIT_ASSERT( s.rfind("two", 0) == string::npos ); CPPUNIT_ASSERT( s.rfind("two", 11) == 4 ); CPPUNIT_ASSERT( s.rfind('w') == 19 ); string test( "aba" ); CPPUNIT_CHECK( test.rfind( "a", 2, 1 ) == 2 ); CPPUNIT_CHECK( test.rfind( "a", 1, 1 ) == 0 ); CPPUNIT_CHECK( test.rfind( "a", 0, 1 ) == 0 ); CPPUNIT_CHECK( test.rfind( 'a', 2 ) == 2 ); CPPUNIT_CHECK( test.rfind( 'a', 1 ) == 0 ); CPPUNIT_CHECK( test.rfind( 'a', 0 ) == 0 ); }