X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/232fdc630c42eb165f7659981043e794be03b3b7..d3ffaafb37c6321640aec28588940a2eda64dfd9:/tests/testableframe.cpp diff --git a/tests/testableframe.cpp b/tests/testableframe.cpp index efa7396f26..d69be423eb 100644 --- a/tests/testableframe.cpp +++ b/tests/testableframe.cpp @@ -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; }