+
+void MenuTestCase::RemoveAdd()
+{
+ wxMenuBar* bar = m_frame->GetMenuBar();
+
+ wxMenu* menu0 = bar->GetMenu(0);
+ wxMenu* menu1 = bar->GetMenu(1);
+ wxMenuItem* item = new wxMenuItem(menu0, MenuTestCase_Foo + 100, "t&ext\tCtrl-E");
+ menu0->Insert(0, item);
+ CPPUNIT_ASSERT( menu0->FindItemByPosition(0) == item );
+ menu0->Remove(item);
+ CPPUNIT_ASSERT( menu0->FindItemByPosition(0) != item );
+ menu1->Insert(0, item);
+ CPPUNIT_ASSERT( menu1->FindItemByPosition(0) == item );
+ menu1->Remove(item);
+ CPPUNIT_ASSERT( menu1->FindItemByPosition(0) != item );
+ menu0->Insert(0, item);
+ CPPUNIT_ASSERT( menu0->FindItemByPosition(0) == item );
+ menu0->Delete(item);
+}