private:
CPPUNIT_TEST_SUITE( SpinCtrlTestCase );
CPPUNIT_TEST( Initial );
+ CPPUNIT_TEST( NoEventsInCtor );
WXUISIM_TEST( Arrows );
WXUISIM_TEST( Wrap );
CPPUNIT_TEST( Range );
CPPUNIT_TEST_SUITE_END();
void Initial();
+ void NoEventsInCtor();
void Arrows();
void Wrap();
void Range();
CPPUNIT_ASSERT_EQUAL( 99, m_spin->GetValue() );
}
+void SpinCtrlTestCase::NoEventsInCtor()
+{
+ // Verify that creating the control does not generate any events. This is
+ // unexpected and shouldn't happen.
+ wxWindow* const parent = m_spin->GetParent();
+ delete m_spin;
+ m_spin = new wxSpinCtrl;
+
+ EventCounter updated(m_spin, wxEVT_COMMAND_SPINCTRL_UPDATED);
+
+ m_spin->Create(parent, wxID_ANY, "",
+ wxDefaultPosition, wxDefaultSize, 0,
+ 0, 100, 17);
+
+ CPPUNIT_ASSERT_EQUAL(0, updated.GetCount());
+}
+
void SpinCtrlTestCase::Arrows()
{
#if wxUSE_UIACTIONSIMULATOR