Delete buttons when we are finished so they do not overlap later controls and cause test failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Steve Lamerton 2012-03-11 15:27:40 +00:00
parent 744d91d41f
commit e7aa703d4b

View File

@ -145,7 +145,7 @@ void MiscGUIFuncsTestCase::FindWindowAtPoint()
!wxFindWindowAtPoint(parent->ClientToScreen(wxPoint(900, 900)))
);
wxWindow* const btn1 = new wxButton(parent, wxID_ANY, "1", wxPoint(10, 10));
wxWindow* btn1 = new wxButton(parent, wxID_ANY, "1", wxPoint(10, 10));
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
"Point over a child control corresponds to it",
@ -160,7 +160,7 @@ void MiscGUIFuncsTestCase::FindWindowAtPoint()
wxFindWindowAtPoint(parent->ClientToScreen(wxPoint(5, 5)))
);
wxWindow* const btn2 = new wxButton(parent, wxID_ANY, "2", wxPoint(10, 90));
wxWindow* btn2 = new wxButton(parent, wxID_ANY, "2", wxPoint(10, 90));
btn2->Disable();
CPPUNIT_ASSERT_EQUAL_MESSAGE
(
@ -176,4 +176,7 @@ void MiscGUIFuncsTestCase::FindWindowAtPoint()
parent,
wxFindWindowAtPoint(parent->ClientToScreen(wxPoint(11, 91)))
);
wxDELETE(btn1);
wxDELETE(btn2);
}