]> git.saurik.com Git - wxWidgets.git/commitdiff
Delete buttons when we are finished so they do not overlap later controls and cause...
authorSteve Lamerton <steve.lamerton@gmail.com>
Sun, 11 Mar 2012 15:27:40 +0000 (15:27 +0000)
committerSteve Lamerton <steve.lamerton@gmail.com>
Sun, 11 Mar 2012 15:27:40 +0000 (15:27 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/misc/guifuncs.cpp

index bd31da6d6cac633933f2dde68c0a3b4736f1470e..ffb339ac1dc530e6feecf49b38e0823c6e66e272 100644 (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);
 }