pickerbasetest.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Name: tests/controls/pickerbasetest.cpp
  3. // Purpose: wxPickerBase unit test
  4. // Author: Steven Lamerton
  5. // Created: 2010-08-07
  6. // Copyright: (c) 2010 Steven Lamerton
  7. ///////////////////////////////////////////////////////////////////////////////
  8. #ifndef _WX_TESTS_CONTROLS_PICKERBASETEST_H_
  9. #define _WX_TESTS_CONTROLS_PICKERBASETEST_H_
  10. class PickerBaseTestCase
  11. {
  12. public:
  13. PickerBaseTestCase() { }
  14. virtual ~PickerBaseTestCase() { }
  15. protected:
  16. // this function must be overridden by the derived classes to return the
  17. // text entry object we're testing, typically this is done by creating a
  18. // control implementing wxPickerBase interface in setUp() virtual method and
  19. // just returning it from here
  20. virtual wxPickerBase *GetBase() const = 0;
  21. // this should be inserted in the derived class CPPUNIT_TEST_SUITE
  22. // definition to run all wxPickerBase tests as part of it
  23. #define wxPICKER_BASE_TESTS() \
  24. CPPUNIT_TEST( Margin ); \
  25. CPPUNIT_TEST( Proportion ); \
  26. CPPUNIT_TEST( Growable ); \
  27. CPPUNIT_TEST( Controls )
  28. void Margin();
  29. void Proportion();
  30. void Growable();
  31. void Controls();
  32. private:
  33. wxDECLARE_NO_COPY_CLASS(PickerBaseTestCase);
  34. };
  35. #endif // _WX_TESTS_CONTROLS_PICKERBASETEST_H_