From e7aa703d4bdce1614d019b46867bac2a266b9cfe Mon Sep 17 00:00:00 2001 From: Steve Lamerton Date: Sun, 11 Mar 2012 15:27:40 +0000 Subject: [PATCH] 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 --- tests/misc/guifuncs.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/misc/guifuncs.cpp b/tests/misc/guifuncs.cpp index bd31da6d6c..ffb339ac1d 100644 --- a/tests/misc/guifuncs.cpp +++ b/tests/misc/guifuncs.cpp @@ -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); } -- 2.47.2