void SliderTestCase::LinePageSize() { #if wxUSE_UIACTIONSIMULATOR wxUIActionSimulator sim; wxYield(); m_slider->SetFocus(); m_slider->SetPageSize(20); sim.Char(WXK_PAGEUP); wxYield(); CPPUNIT_ASSERT_EQUAL(20, m_slider->GetPageSize()); CPPUNIT_ASSERT_EQUAL(30, m_slider->GetValue()); m_slider->SetLineSize(2); sim.Char(WXK_UP); wxYield(); CPPUNIT_ASSERT_EQUAL(2, m_slider->GetLineSize()); CPPUNIT_ASSERT_EQUAL(28, m_slider->GetValue()); #endif }
void SliderTestCase::PageUpDown() { #if wxUSE_UIACTIONSIMULATOR EventCounter pageup(m_slider, wxEVT_SCROLL_PAGEUP); EventCounter pagedown(m_slider, wxEVT_SCROLL_PAGEDOWN); wxUIActionSimulator sim; m_slider->SetFocus(); sim.Char(WXK_PAGEUP); sim.Char(WXK_PAGEDOWN); wxYield(); CPPUNIT_ASSERT_EQUAL(1, pageup.GetCount()); CPPUNIT_ASSERT_EQUAL(1, pagedown.GetCount()); #endif }