]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/arrays/arrays.cpp
Added implementation of thread local storage for OS/2.
[wxWidgets.git] / tests / arrays / arrays.cpp
index 819b1b7a69694fb8ecba6364172f4d36a18cbc12..42cacef17c59f37d1bc275d598215500a6b85ab8 100644 (file)
@@ -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
 // ----------------------------------------------------------------------------
@@ -594,4 +603,10 @@ void ArraysTestCase::TestSTL()
     {
         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 );
 }