]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/lists/lists.cpp
fix the bug in insert(end(), value) and added unit test for it
[wxWidgets.git] / tests / lists / lists.cpp
index 85eea4c98f7cb73895c4014b0e3918862019ebc7..ac9964549042d6b1ad52341c82edcf798bba58e2 100644 (file)
@@ -157,6 +157,14 @@ void ListsTestCase::wxStdListTest()
     {
         CPPUNIT_ASSERT( *it == i + &i );
     }
+
+    list1.clear();
+    CPPUNIT_ASSERT( list1.empty() );
+
+    list1.insert(list1.end(), (int *)1);
+    list1.insert(list1.end(), (int *)2);
+    CPPUNIT_ASSERT_EQUAL( (int *)1, list1.front() );
+    CPPUNIT_ASSERT_EQUAL( (int *)2, list1.back() );
 }
 
 void ListsTestCase::wxListCtorTest()