made wxArrayString::assign(iterator, iterator) a template function; also fixed a bad bug in it: it didn't call clear(); mention existence of std::vector-like methods in the docs

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-12 12:09:13 +00:00
parent e0983733bd
commit d11c9d86b6
4 changed files with 49 additions and 9 deletions

View File

@@ -314,6 +314,19 @@ void ArraysTestCase::wxStringArrayTest()
_T("a") ,
_T("a") ,
_T("a") ) );
a5.assign(a1.end(), a1.end());
CPPUNIT_ASSERT( a5.empty() );
a5.assign(a1.begin(), a1.end());
CPPUNIT_ASSERT( a5 == a1 );
#ifdef wxHAS_VECTOR_TEMPLATE_ASSIGN
const wxString months[] = { "Jan", "Feb", "Mar" };
a5.assign(months, months + WXSIZEOF(months));
CPPUNIT_ASSERT_EQUAL( WXSIZEOF(months), a5.size() );
CPPUNIT_ASSERT( COMPARE_3_VALUES(a5, "Jan", "Feb", "Mar") );
#endif // wxHAS_VECTOR_TEMPLATE_ASSIGN
}
void ArraysTestCase::wxStringArraySplitTest()