git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58734
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
} \
iterator erase(const iterator& first, const iterator& last) \
{ \
- iterator next = last; ++next; \
+ iterator next = last; \
+ if ( next != end() ) \
+ ++next; \
DeleteNodes(first.m_node, last.m_node); \
return next; \
} \
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() );
}
void ListsTestCase::wxListCtorTest()