X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6124b134075d337cc8333a2ff45d477c2af2055a..fec34ef52dad898e72dd488f939ea0db5ec09ead:/tests/lists/lists.cpp diff --git a/tests/lists/lists.cpp b/tests/lists/lists.cpp index f634eb5231..907e87c70a 100644 --- a/tests/lists/lists.cpp +++ b/tests/lists/lists.cpp @@ -156,6 +156,22 @@ void ListsTestCase::wxStdListTest() list1.insert(list1.end(), (int *)2); CPPUNIT_ASSERT_EQUAL( (int *)1, list1.front() ); CPPUNIT_ASSERT_EQUAL( (int *)2, list1.back() ); + + it = list1.begin(); + it = list1.erase(++it, list1.end()); + CPPUNIT_ASSERT_EQUAL( 1, list1.size() ); + CPPUNIT_ASSERT( it == list1.end() ); + + wxListInt list2; + list2.push_back((int *)3); + list2.push_back((int *)4); + list1.insert(list1.begin(), list2.begin(), list2.end()); + CPPUNIT_ASSERT_EQUAL( 3, list1.size() ); + CPPUNIT_ASSERT_EQUAL( (int *)3, list1.front() ); + + list1.insert(list1.end(), list2.begin(), list2.end()); + CPPUNIT_ASSERT_EQUAL( 5, list1.size() ); + CPPUNIT_ASSERT_EQUAL( (int *)4, list1.back() ); } void ListsTestCase::wxListCtorTest()