CPPUNIT_TEST_SUITE( StdStringTestCase );
CPPUNIT_TEST( StdConstructors );
CPPUNIT_TEST( StdIterators );
+ CPPUNIT_TEST( StdIteratorsCmp );
CPPUNIT_TEST( StdAppend );
CPPUNIT_TEST( StdAssign );
CPPUNIT_TEST( StdCompare );
void StdConstructors();
void StdIterators();
+ void StdIteratorsCmp();
void StdAppend();
void StdAssign();
void StdCompare();
wxString::const_reverse_iterator i4;
}
+void StdStringTestCase::StdIteratorsCmp()
+{
+ wxString s("foobar");
+ wxString::iterator i = s.begin();
+ wxString::const_iterator ci = s.begin();
+
+ CPPUNIT_ASSERT( i == ci );
+ CPPUNIT_ASSERT( i >= ci );
+ CPPUNIT_ASSERT( i <= ci );
+ CPPUNIT_ASSERT( ci == i );
+ CPPUNIT_ASSERT( ci >= i );
+ CPPUNIT_ASSERT( ci <= i );
+
+ ci++;
+
+ CPPUNIT_ASSERT( i != ci );
+ CPPUNIT_ASSERT( i < ci );
+ CPPUNIT_ASSERT( !(i > ci) );
+
+ CPPUNIT_ASSERT( ci != i );
+ CPPUNIT_ASSERT( ci > i );
+ CPPUNIT_ASSERT( !(ci < i) );
+}
+
void StdStringTestCase::StdAppend()
{
wxString s1, s2, s3, s4, s5, s6, s7, s8;