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;
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
// ----------------------------------------------------------------------------
wxT("<title>Initial page of Mozilla Firefox</title>")
wxT("</meta></head></html>");
- for (size_t i=0; i < WXSIZEOF(separators); i++)
+ size_t i;
+ for (i = 0; i < WXSIZEOF(separators); i++)
{
wxArrayString arr = wxSplit(str, separators[i]);
CPPUNIT_ASSERT( str == wxJoin(arr, separators[i]) );
};
wxArrayString theArr(WXSIZEOF(arr), arr);
- for (size_t i=0; i < WXSIZEOF(separators); i++)
+ for (i = 0; i < WXSIZEOF(separators); i++)
{
wxString string = wxJoin(theArr, separators[i]);
CPPUNIT_ASSERT( theArr == wxSplit(string, separators[i]) );
{
CPPUNIT_ASSERT( *it == i );
}
+
+
+ ItemPtrArray items;
+ items.push_back(new Item(17));
+ CPPUNIT_ASSERT_EQUAL( 17, (*(items.rbegin()))->n );
+ CPPUNIT_ASSERT_EQUAL( 17, (**items.begin()).n );
}