]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/testableframe.cpp
No real changes, just remove unnecessary const workaround.
[wxWidgets.git] / tests / testableframe.cpp
index efa7396f267dcc6cd22cc2d7c4aa7edb923beff0..d69be423ebef1686d6b5ff6fa78a1d80815d1c7d 100644 (file)
@@ -2,7 +2,7 @@
 // Name:        testableframe.cpp
 // Purpose:     An improved wxFrame for unit-testing
 // Author:      Steven Lamerton
-// RCS-ID:      $Id:$
+// RCS-ID:      $Id$
 // Copyright:   (c) 2010 Steven Lamerton
 // Licence:     wxWidgets licence
 ///////////////////////////////////////////////////////////////////////////////
@@ -54,6 +54,11 @@ int wxTestableFrame::GetEventCount(wxEventType type)
     }
 }
 
+void wxTestableFrame::ClearEventCount(wxEventType type)
+{
+    m_count[type] = 0;
+}
+
 EventCounter::EventCounter(wxWindow* win, wxEventType type) : m_type(type),
                                                               m_win(win)
 
@@ -74,6 +79,9 @@ EventCounter::~EventCounter()
                       NULL,
                       m_frame);
 
+    //This stops spurious counts from previous tests
+    m_frame->ClearEventCount(m_type);
+
     m_frame = NULL;
     m_win = NULL;
 }