} \
iterator insert(const iterator& it, const_reference v) \
{ \
- Insert(it.m_node, (const_base_reference)v); \
+ if ( it == end() ) \
+ Append((const_base_reference)v); \
+ else \
+ Insert(it.m_node, (const_base_reference)v); \
iterator itprev(it); \
return itprev--; \
} \
Insert(it.m_node, (const_base_reference)v); \
} \
void insert(const iterator& it, \
- const const_iterator& first, const const_iterator& last)\
+ const_iterator first, const const_iterator& last) \
{ \
for(; first != last; ++first) \
Insert(it.m_node, (const_base_reference)*first); \
{
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()