]> git.saurik.com Git - wxWidgets.git/blame - tests/controls/simplebooktest.cpp
Consistently handle DST start time in wxDateTime::Set().
[wxWidgets.git] / tests / controls / simplebooktest.cpp
CommitLineData
10e6908d
VZ
1///////////////////////////////////////////////////////////////////////////////
2// Name: tests/controls/simplebooktest.cpp
3// Purpose: wxSimplebook unit test
4// Author: Vadim Zeitlin
5// Created: 2013-06-23
10e6908d
VZ
6// Copyright: (c) 2013 Vadim Zeitlin <vadim@wxwidgets.org>
7///////////////////////////////////////////////////////////////////////////////
8
9#include "testprec.h"
10
11#if wxUSE_BOOKCTRL
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
17#ifndef WX_PRECOMP
18 #include "wx/app.h"
19 #include "wx/panel.h"
20#endif // WX_PRECOMP
21
22#include "wx/simplebook.h"
23#include "bookctrlbasetest.h"
24
25class SimplebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
26{
27public:
28 SimplebookTestCase() { }
29
30 virtual void setUp();
31 virtual void tearDown();
32
33private:
34 virtual wxBookCtrlBase *GetBase() const { return m_simplebook; }
35
36 virtual wxEventType GetChangedEvent() const
37 { return wxEVT_BOOKCTRL_PAGE_CHANGED; }
38
39 virtual wxEventType GetChangingEvent() const
40 { return wxEVT_BOOKCTRL_PAGE_CHANGING; }
41
42 CPPUNIT_TEST_SUITE( SimplebookTestCase );
43 wxBOOK_CTRL_BASE_TESTS();
44 CPPUNIT_TEST_SUITE_END();
45
46 wxSimplebook *m_simplebook;
47
48 DECLARE_NO_COPY_CLASS(SimplebookTestCase)
49};
50
51// register in the unnamed registry so that these tests are run by default
52CPPUNIT_TEST_SUITE_REGISTRATION( SimplebookTestCase );
53
54// also include in its own registry so that these tests can be run alone
55CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( SimplebookTestCase, "SimplebookTestCase" );
56
57void SimplebookTestCase::setUp()
58{
59 m_simplebook = new wxSimplebook(wxTheApp->GetTopWindow(), wxID_ANY);
60 AddPanels();
61}
62
63void SimplebookTestCase::tearDown()
64{
65 wxDELETE(m_simplebook);
66}
67
68#endif // wxUSE_BOOKCTRL
69