X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/abbb59e8eb995f445759df30ee507c74af690b51..52cefafe7e85c807c92440d20afa1e4d88cc6be3:/tests/arrays/arrays.cpp diff --git a/tests/arrays/arrays.cpp b/tests/arrays/arrays.cpp index 8d05e0ca8d..972abe40f0 100644 --- a/tests/arrays/arrays.cpp +++ b/tests/arrays/arrays.cpp @@ -82,7 +82,7 @@ public: static size_t GetNumber() { return ms_bars; } - const wxChar *GetName() const { return m_name; } + const wxChar *GetName() const { return m_name.c_str(); } private: wxString m_name; @@ -139,6 +139,15 @@ WX_DEFINE_SORTED_ARRAY_CMP_SHORT(ushort, UShortCompareValues, wxSortedArrayUShor WX_DEFINE_SORTED_ARRAY_CMP_INT(int, IntCompareValues, wxSortedArrayInt); +struct Item +{ + Item(int n_ = 0) : n(n_) { } + + int n; +}; + +WX_DEFINE_ARRAY_PTR(Item *, ItemPtrArray); + // ---------------------------------------------------------------------------- // test class // ---------------------------------------------------------------------------- @@ -161,6 +170,7 @@ private: CPPUNIT_TEST( wxArrayCharTest ); CPPUNIT_TEST( TestSTL ); CPPUNIT_TEST( Alloc ); + CPPUNIT_TEST( Swap ); CPPUNIT_TEST_SUITE_END(); void wxStringArrayTest(); @@ -173,6 +183,7 @@ private: void wxArrayCharTest(); void TestSTL(); void Alloc(); + void Swap(); DECLARE_NO_COPY_CLASS(ArraysTestCase) }; @@ -424,7 +435,8 @@ void ArraysTestCase::wxStringArraySplitJoinTest() wxT("