wxWidgets/tests/controls/itemcontainertest.h
Vadim Zeitlin bce926c580 Add "GTK" prefix to wxChoice::{Dis,En}ableEvents() methods in wxGTK.
This is more than a cosmetic change: adding "GTK" prefix in wxComboBox and not
doing it in wxChoice in r64436 broke the event generation for wxComboBox as it
didn't override wxChoice methods any longer but defined its own (useless) ones.

Using the same name for the methods in both classes notably fixes unexpected
event generation from wxComboBox::SetSelection().

Closes #12568.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65818 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-15 23:46:32 +00:00

61 lines
2.0 KiB
C++

///////////////////////////////////////////////////////////////////////////////
// Name: tests/controls/itemcontainertest.h
// Purpose: wxItemContainer unit test
// Author: Steven Lamerton
// Created: 2010-06-29
// RCS-ID: $Id$
// Copyright: (c) 2010 Steven Lamerton
///////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
#define _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_
class ItemContainerTestCase
{
public:
ItemContainerTestCase() { }
virtual ~ItemContainerTestCase() { }
protected:
// this function must be overridden by the derived classes to return the
// text entry object we're testing, typically this is done by creating a
// control implementing wxItemContainer interface in setUp() virtual method and
// just returning it from here
virtual wxItemContainer *GetContainer() const = 0;
// and this one must be overridden to return the window which implements
// wxItemContainer interface -- usually it will return the same pointer as
// GetTestEntry(), just as a different type
virtual wxWindow *GetContainerWindow() const = 0;
// this should be inserted in the derived class CPPUNIT_TEST_SUITE
// definition to run all wxItemContainer tests as part of it
#define wxITEM_CONTAINER_TESTS() \
CPPUNIT_TEST( Append ); \
CPPUNIT_TEST( Insert ); \
CPPUNIT_TEST( Count ); \
CPPUNIT_TEST( ItemSelection ); \
CPPUNIT_TEST( FindString ); \
CPPUNIT_TEST( ClientData ); \
CPPUNIT_TEST( VoidData ); \
CPPUNIT_TEST( Set ); \
CPPUNIT_TEST( SetSelection ); \
CPPUNIT_TEST( SetString )
void Append();
void Insert();
void Count();
void ItemSelection();
void FindString();
void ClientData();
void VoidData();
void Set();
void SetSelection();
void SetString();
private:
wxDECLARE_NO_COPY_CLASS(ItemContainerTestCase);
};
#endif // _WX_TESTS_CONTROLS_ITEMCONTAINERTEST_H_