Add wxOVERRIDE to test files

And cleanup some tailing spaces and tabs.
This commit is contained in:
Maarten Bent
2018-07-29 11:09:17 +02:00
parent 56a51ad1e7
commit 57180d68c8
87 changed files with 252 additions and 252 deletions

View File

@@ -25,7 +25,7 @@ using std::string;
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tar suite // Tar suite
class tartest : public ArchiveTestSuite class tartest : public ArchiveTestSuite
{ {
@@ -38,7 +38,7 @@ protected:
CppUnit::Test *makeTest(string descr, int options, CppUnit::Test *makeTest(string descr, int options,
bool genericInterface, bool genericInterface,
const wxString& archiver, const wxString& archiver,
const wxString& unarchiver); const wxString& unarchiver) wxOVERRIDE;
}; };
tartest::tartest() tartest::tartest()

View File

@@ -43,13 +43,13 @@ public:
protected: protected:
void OnCreateArchive(wxZipOutputStream& zip); void OnCreateArchive(wxZipOutputStream& zip);
void OnArchiveExtracted(wxZipInputStream& zip, int expectedTotal); void OnArchiveExtracted(wxZipInputStream& zip, int expectedTotal);
void OnCreateEntry(wxZipOutputStream& zip, void OnCreateEntry(wxZipOutputStream& zip,
TestEntry& testEntry, TestEntry& testEntry,
wxZipEntry *entry); wxZipEntry *entry);
void OnEntryExtracted(wxZipEntry& entry, void OnEntryExtracted(wxZipEntry& entry,
const TestEntry& testEntry, const TestEntry& testEntry,
wxZipInputStream *arc); wxZipInputStream *arc);
@@ -206,7 +206,7 @@ void ZipPipeTestCase::runTest()
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Zip suite // Zip suite
class ziptest : public ArchiveTestSuite class ziptest : public ArchiveTestSuite
{ {
@@ -218,7 +218,7 @@ public:
protected: protected:
CppUnit::Test *makeTest(string descr, int options, CppUnit::Test *makeTest(string descr, int options,
bool genericInterface, const wxString& archiver, bool genericInterface, const wxString& archiver,
const wxString& unarchiver); const wxString& unarchiver) wxOVERRIDE;
}; };
ziptest::ziptest() ziptest::ziptest()

View File

@@ -34,17 +34,17 @@ class BitmapComboBoxTestCase : public TextEntryTestCase,
public: public:
BitmapComboBoxTestCase() { } BitmapComboBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxTextEntry *GetTestEntry() const { return m_combo; } virtual wxTextEntry *GetTestEntry() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetTestWindow() const { return m_combo; } virtual wxWindow *GetTestWindow() const wxOVERRIDE { return m_combo; }
virtual wxItemContainer *GetContainer() const { return m_combo; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetContainerWindow() const { return m_combo; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_combo; }
virtual void CheckStringSelection(const char * WXUNUSED(sel)) virtual void CheckStringSelection(const char * WXUNUSED(sel)) wxOVERRIDE
{ {
// do nothing here, as explained in TextEntryTestCase comment, our // do nothing here, as explained in TextEntryTestCase comment, our
// GetStringSelection() is the wxChoice, not wxTextEntry, one and there // GetStringSelection() is the wxChoice, not wxTextEntry, one and there

View File

@@ -31,8 +31,8 @@ class BitmapToggleButtonTestCase : public CppUnit::TestCase
public: public:
BitmapToggleButtonTestCase() { } BitmapToggleButtonTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( BitmapToggleButtonTestCase ); CPPUNIT_TEST_SUITE( BitmapToggleButtonTestCase );

View File

@@ -32,8 +32,8 @@ class ButtonTestCase : public CppUnit::TestCase
public: public:
ButtonTestCase() { } ButtonTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( ButtonTestCase ); CPPUNIT_TEST_SUITE( ButtonTestCase );
@@ -164,7 +164,7 @@ void ButtonTestCase::Bitmap()
CPPUNIT_ASSERT(!m_button->GetBitmap().IsOk()); CPPUNIT_ASSERT(!m_button->GetBitmap().IsOk());
m_button->SetBitmap(wxArtProvider::GetIcon(wxART_INFORMATION, m_button->SetBitmap(wxArtProvider::GetIcon(wxART_INFORMATION,
wxART_OTHER, wxART_OTHER,
wxSize(32, 32))); wxSize(32, 32)));

View File

@@ -26,8 +26,8 @@ class CheckBoxTestCase : public CppUnit::TestCase
public: public:
CheckBoxTestCase() { } CheckBoxTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( CheckBoxTestCase ); CPPUNIT_TEST_SUITE( CheckBoxTestCase );

View File

@@ -27,12 +27,12 @@ class CheckListBoxTestCase : public ItemContainerTestCase, public CppUnit::TestC
public: public:
CheckListBoxTestCase() { } CheckListBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxItemContainer *GetContainer() const { return m_check; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_check; }
virtual wxWindow *GetContainerWindow() const { return m_check; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_check; }
CPPUNIT_TEST_SUITE( CheckListBoxTestCase ); CPPUNIT_TEST_SUITE( CheckListBoxTestCase );
wxITEM_CONTAINER_TESTS(); wxITEM_CONTAINER_TESTS();

View File

@@ -27,16 +27,16 @@ class ChoicebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
ChoicebookTestCase() { } ChoicebookTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_choicebook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_choicebook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_CHOICEBOOK_PAGE_CHANGED; } { return wxEVT_CHOICEBOOK_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_CHOICEBOOK_PAGE_CHANGING; } { return wxEVT_CHOICEBOOK_PAGE_CHANGING; }
CPPUNIT_TEST_SUITE( ChoicebookTestCase ); CPPUNIT_TEST_SUITE( ChoicebookTestCase );

View File

@@ -26,12 +26,12 @@ class ChoiceTestCase : public ItemContainerTestCase, public CppUnit::TestCase
public: public:
ChoiceTestCase() { } ChoiceTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxItemContainer *GetContainer() const { return m_choice; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_choice; }
virtual wxWindow *GetContainerWindow() const { return m_choice; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_choice; }
CPPUNIT_TEST_SUITE( ChoiceTestCase ); CPPUNIT_TEST_SUITE( ChoiceTestCase );
wxITEM_CONTAINER_TESTS(); wxITEM_CONTAINER_TESTS();

View File

@@ -37,17 +37,17 @@ class ComboBoxTestCase : public TextEntryTestCase, public ItemContainerTestCase,
public: public:
ComboBoxTestCase() { } ComboBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxTextEntry *GetTestEntry() const { return m_combo; } virtual wxTextEntry *GetTestEntry() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetTestWindow() const { return m_combo; } virtual wxWindow *GetTestWindow() const wxOVERRIDE { return m_combo; }
virtual wxItemContainer *GetContainer() const { return m_combo; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetContainerWindow() const { return m_combo; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_combo; }
virtual void CheckStringSelection(const char * WXUNUSED(sel)) virtual void CheckStringSelection(const char * WXUNUSED(sel)) wxOVERRIDE
{ {
// do nothing here, as explained in TextEntryTestCase comment, our // do nothing here, as explained in TextEntryTestCase comment, our
// GetStringSelection() is the wxChoice, not wxTextEntry, one and there // GetStringSelection() is the wxChoice, not wxTextEntry, one and there
@@ -64,7 +64,7 @@ private:
// TODO on OS X only works interactively // TODO on OS X only works interactively
// WXUISIM_TEST( Editable ); // WXUISIM_TEST( Editable );
CPPUNIT_TEST( Hint ); CPPUNIT_TEST( Hint );
CPPUNIT_TEST( CopyPaste ); CPPUNIT_TEST( CopyPaste );
CPPUNIT_TEST( UndoRedo ); CPPUNIT_TEST( UndoRedo );
#else #else
wxTEXT_ENTRY_TESTS(); wxTEXT_ENTRY_TESTS();

View File

@@ -32,8 +32,8 @@ class DataViewCtrlTestCase : public CppUnit::TestCase
public: public:
DataViewCtrlTestCase() { } DataViewCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( DataViewCtrlTestCase ); CPPUNIT_TEST_SUITE( DataViewCtrlTestCase );

View File

@@ -30,8 +30,8 @@ class DatePickerCtrlTestCase : public CppUnit::TestCase
public: public:
DatePickerCtrlTestCase() { } DatePickerCtrlTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( DatePickerCtrlTestCase ); CPPUNIT_TEST_SUITE( DatePickerCtrlTestCase );

View File

@@ -24,8 +24,8 @@ class FrameTestCase : public CppUnit::TestCase
public: public:
FrameTestCase() { } FrameTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( FrameTestCase ); CPPUNIT_TEST_SUITE( FrameTestCase );

View File

@@ -24,8 +24,8 @@ class GaugeTestCase : public CppUnit::TestCase
public: public:
GaugeTestCase() { } GaugeTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( GaugeTestCase ); CPPUNIT_TEST_SUITE( GaugeTestCase );

View File

@@ -42,8 +42,8 @@ class GridTestCase : public CppUnit::TestCase
public: public:
GridTestCase() { } GridTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( GridTestCase ); CPPUNIT_TEST_SUITE( GridTestCase );

View File

@@ -31,8 +31,8 @@ class HeaderCtrlTestCase : public CppUnit::TestCase
public: public:
HeaderCtrlTestCase() { } HeaderCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( HeaderCtrlTestCase ); CPPUNIT_TEST_SUITE( HeaderCtrlTestCase );

View File

@@ -25,12 +25,12 @@ class HtmlListBoxTestCase : public ItemContainerTestCase,
public: public:
HtmlListBoxTestCase() { } HtmlListBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxItemContainer *GetContainer() const { return m_htmllbox; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_htmllbox; }
virtual wxWindow *GetContainerWindow() const { return m_htmllbox; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_htmllbox; }
CPPUNIT_TEST_SUITE( HtmlListBoxTestCase ); CPPUNIT_TEST_SUITE( HtmlListBoxTestCase );
wxITEM_CONTAINER_TESTS(); wxITEM_CONTAINER_TESTS();

View File

@@ -28,8 +28,8 @@ class HyperlinkCtrlTestCase : public CppUnit::TestCase
public: public:
HyperlinkCtrlTestCase() { } HyperlinkCtrlTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( HyperlinkCtrlTestCase ); CPPUNIT_TEST_SUITE( HyperlinkCtrlTestCase );

View File

@@ -33,8 +33,8 @@ class LabelTestCase : public CppUnit::TestCase
public: public:
LabelTestCase() { } LabelTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( LabelTestCase ); CPPUNIT_TEST_SUITE( LabelTestCase );

View File

@@ -179,7 +179,7 @@ void ListBaseTestCase::ChangeMode()
void ListBaseTestCase::ItemClick() void ListBaseTestCase::ItemClick()
{ {
#if wxUSE_UIACTIONSIMULATOR #if wxUSE_UIACTIONSIMULATOR
#ifdef __WXMSW__ #ifdef __WXMSW__
// FIXME: This test fails on MSW buildbot slaves although works fine on // FIXME: This test fails on MSW buildbot slaves although works fine on
@@ -226,7 +226,7 @@ void ListBaseTestCase::ItemClick()
// when the first item was selected the focus changes to it, but not // when the first item was selected the focus changes to it, but not
// on subsequent clicks // on subsequent clicks
// FIXME: This test fail under wxGTK & wxOSX because we get 3 FOCUSED events and // FIXME: This test fail under wxGTK & wxOSX because we get 3 FOCUSED events and
// 2 SELECTED ones instead of the one of each we expect for some // 2 SELECTED ones instead of the one of each we expect for some
// reason, this needs to be debugged as it may indicate a bug in the // reason, this needs to be debugged as it may indicate a bug in the

View File

@@ -28,16 +28,16 @@ class ListbookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
ListbookTestCase() { } ListbookTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_listbook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_listbook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_LISTBOOK_PAGE_CHANGED; } { return wxEVT_LISTBOOK_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_LISTBOOK_PAGE_CHANGING; } { return wxEVT_LISTBOOK_PAGE_CHANGING; }
CPPUNIT_TEST_SUITE( ListbookTestCase ); CPPUNIT_TEST_SUITE( ListbookTestCase );

View File

@@ -28,12 +28,12 @@ class ListBoxTestCase : public ItemContainerTestCase, public CppUnit::TestCase
public: public:
ListBoxTestCase() { } ListBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxItemContainer *GetContainer() const { return m_list; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_list; }
virtual wxWindow *GetContainerWindow() const { return m_list; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_list; }
CPPUNIT_TEST_SUITE( ListBoxTestCase ); CPPUNIT_TEST_SUITE( ListBoxTestCase );
wxITEM_CONTAINER_TESTS(); wxITEM_CONTAINER_TESTS();

View File

@@ -37,10 +37,10 @@ class ListCtrlTestCase : public ListBaseTestCase, public CppUnit::TestCase
public: public:
ListCtrlTestCase() { } ListCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
virtual wxListCtrl *GetList() const { return m_list; } virtual wxListCtrl *GetList() const wxOVERRIDE { return m_list; }
private: private:
CPPUNIT_TEST_SUITE( ListCtrlTestCase ); CPPUNIT_TEST_SUITE( ListCtrlTestCase );

View File

@@ -24,10 +24,10 @@ class ListViewTestCase : public ListBaseTestCase, public CppUnit::TestCase
public: public:
ListViewTestCase() { } ListViewTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
virtual wxListCtrl *GetList() const { return m_list; } virtual wxListCtrl *GetList() const wxOVERRIDE { return m_list; }
private: private:
CPPUNIT_TEST_SUITE( ListViewTestCase ); CPPUNIT_TEST_SUITE( ListViewTestCase );

View File

@@ -27,16 +27,16 @@ class NotebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
NotebookTestCase() { m_notebook = NULL; m_numPageChanges = 0; } NotebookTestCase() { m_notebook = NULL; m_numPageChanges = 0; }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_notebook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_notebook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_NOTEBOOK_PAGE_CHANGED; } { return wxEVT_NOTEBOOK_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_NOTEBOOK_PAGE_CHANGING; } { return wxEVT_NOTEBOOK_PAGE_CHANGING; }

View File

@@ -39,17 +39,17 @@ class OwnerDrawnComboBoxTestCase : public TextEntryTestCase,
public: public:
OwnerDrawnComboBoxTestCase() { } OwnerDrawnComboBoxTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxTextEntry *GetTestEntry() const { return m_combo; } virtual wxTextEntry *GetTestEntry() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetTestWindow() const { return m_combo; } virtual wxWindow *GetTestWindow() const wxOVERRIDE { return m_combo; }
virtual wxItemContainer *GetContainer() const { return m_combo; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_combo; }
virtual wxWindow *GetContainerWindow() const { return m_combo; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_combo; }
virtual void CheckStringSelection(const char * WXUNUSED(sel)) virtual void CheckStringSelection(const char * WXUNUSED(sel)) wxOVERRIDE
{ {
// do nothing here, as explained in TextEntryTestCase comment, our // do nothing here, as explained in TextEntryTestCase comment, our
// GetStringSelection() is the wxChoice, not wxTextEntry, one and there // GetStringSelection() is the wxChoice, not wxTextEntry, one and there

View File

@@ -30,11 +30,11 @@ class ColourPickerCtrlTestCase : public PickerBaseTestCase,
public: public:
ColourPickerCtrlTestCase() { } ColourPickerCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxPickerBase *GetBase() const { return m_colour; } virtual wxPickerBase *GetBase() const wxOVERRIDE { return m_colour; }
CPPUNIT_TEST_SUITE( ColourPickerCtrlTestCase ); CPPUNIT_TEST_SUITE( ColourPickerCtrlTestCase );
wxPICKER_BASE_TESTS(); wxPICKER_BASE_TESTS();
@@ -74,11 +74,11 @@ class DirPickerCtrlTestCase : public PickerBaseTestCase,
public: public:
DirPickerCtrlTestCase() { } DirPickerCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxPickerBase *GetBase() const { return m_dir; } virtual wxPickerBase *GetBase() const wxOVERRIDE { return m_dir; }
CPPUNIT_TEST_SUITE( DirPickerCtrlTestCase ); CPPUNIT_TEST_SUITE( DirPickerCtrlTestCase );
wxPICKER_BASE_TESTS(); wxPICKER_BASE_TESTS();
@@ -119,11 +119,11 @@ class FilePickerCtrlTestCase : public PickerBaseTestCase,
public: public:
FilePickerCtrlTestCase() { } FilePickerCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxPickerBase *GetBase() const { return m_file; } virtual wxPickerBase *GetBase() const wxOVERRIDE { return m_file; }
CPPUNIT_TEST_SUITE( FilePickerCtrlTestCase ); CPPUNIT_TEST_SUITE( FilePickerCtrlTestCase );
wxPICKER_BASE_TESTS(); wxPICKER_BASE_TESTS();
@@ -165,11 +165,11 @@ class FontPickerCtrlTestCase : public PickerBaseTestCase,
public: public:
FontPickerCtrlTestCase() { } FontPickerCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxPickerBase *GetBase() const { return m_font; } virtual wxPickerBase *GetBase() const wxOVERRIDE { return m_font; }
CPPUNIT_TEST_SUITE( FontPickerCtrlTestCase ); CPPUNIT_TEST_SUITE( FontPickerCtrlTestCase );
wxPICKER_BASE_TESTS(); wxPICKER_BASE_TESTS();

View File

@@ -26,8 +26,8 @@ class RadioBoxTestCase : public CppUnit::TestCase
public: public:
RadioBoxTestCase() { } RadioBoxTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( RadioBoxTestCase ); CPPUNIT_TEST_SUITE( RadioBoxTestCase );

View File

@@ -27,8 +27,8 @@ class RadioButtonTestCase : public CppUnit::TestCase
public: public:
RadioButtonTestCase() { } RadioButtonTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( RadioButtonTestCase ); CPPUNIT_TEST_SUITE( RadioButtonTestCase );

View File

@@ -25,12 +25,12 @@ class RearrangeListTestCase : public ItemContainerTestCase, public CppUnit::Test
public: public:
RearrangeListTestCase() { } RearrangeListTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxItemContainer *GetContainer() const { return m_rearrange; } virtual wxItemContainer *GetContainer() const wxOVERRIDE { return m_rearrange; }
virtual wxWindow *GetContainerWindow() const { return m_rearrange; } virtual wxWindow *GetContainerWindow() const wxOVERRIDE { return m_rearrange; }
CPPUNIT_TEST_SUITE( RearrangeListTestCase ); CPPUNIT_TEST_SUITE( RearrangeListTestCase );
wxITEM_CONTAINER_TESTS(); wxITEM_CONTAINER_TESTS();

View File

@@ -29,8 +29,8 @@ class RichTextCtrlTestCase : public CppUnit::TestCase
public: public:
RichTextCtrlTestCase() { } RichTextCtrlTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( RichTextCtrlTestCase ); CPPUNIT_TEST_SUITE( RichTextCtrlTestCase );

View File

@@ -27,16 +27,16 @@ class SimplebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
SimplebookTestCase() { } SimplebookTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_simplebook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_simplebook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_BOOKCTRL_PAGE_CHANGED; } { return wxEVT_BOOKCTRL_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_BOOKCTRL_PAGE_CHANGING; } { return wxEVT_BOOKCTRL_PAGE_CHANGING; }
CPPUNIT_TEST_SUITE( SimplebookTestCase ); CPPUNIT_TEST_SUITE( SimplebookTestCase );

View File

@@ -27,8 +27,8 @@ class SliderTestCase : public CppUnit::TestCase
public: public:
SliderTestCase() { } SliderTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( SliderTestCase ); CPPUNIT_TEST_SUITE( SliderTestCase );

View File

@@ -25,8 +25,8 @@ class SpinCtrlDoubleTestCase : public CppUnit::TestCase
public: public:
SpinCtrlDoubleTestCase() { } SpinCtrlDoubleTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( SpinCtrlDoubleTestCase ); CPPUNIT_TEST_SUITE( SpinCtrlDoubleTestCase );

View File

@@ -27,8 +27,8 @@ class SpinCtrlTestCase : public CppUnit::TestCase
public: public:
SpinCtrlTestCase() { } SpinCtrlTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( SpinCtrlTestCase ); CPPUNIT_TEST_SUITE( SpinCtrlTestCase );

View File

@@ -41,12 +41,12 @@ class TextCtrlTestCase : public TextEntryTestCase, public CppUnit::TestCase
public: public:
TextCtrlTestCase() { } TextCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxTextEntry *GetTestEntry() const { return m_text; } virtual wxTextEntry *GetTestEntry() const wxOVERRIDE { return m_text; }
virtual wxWindow *GetTestWindow() const { return m_text; } virtual wxWindow *GetTestWindow() const wxOVERRIDE { return m_text; }
#define SINGLE_AND_MULTI_TESTS() \ #define SINGLE_AND_MULTI_TESTS() \
WXUISIM_TEST( ReadOnly ); \ WXUISIM_TEST( ReadOnly ); \
@@ -223,7 +223,7 @@ void TextCtrlTestCase::ReadOnly()
// SetEditable() is supposed to override wxTE_READONLY // SetEditable() is supposed to override wxTE_READONLY
m_text->SetEditable(true); m_text->SetEditable(true);
#if defined(__WXOSX__) || defined(__WXUNIVERSAL__) #if defined(__WXOSX__) || defined(__WXUNIVERSAL__)
// a ready only text field might not have been focusable at all // a ready only text field might not have been focusable at all
m_text->SetFocus(); m_text->SetFocus();

View File

@@ -27,8 +27,8 @@ class ToggleButtonTestCase : public CppUnit::TestCase
public: public:
ToggleButtonTestCase() { } ToggleButtonTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( ToggleButtonTestCase ); CPPUNIT_TEST_SUITE( ToggleButtonTestCase );

View File

@@ -28,19 +28,19 @@ class ToolbookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
ToolbookTestCase() { } ToolbookTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_toolbook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_toolbook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_TOOLBOOK_PAGE_CHANGED; } { return wxEVT_TOOLBOOK_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_TOOLBOOK_PAGE_CHANGING; } { return wxEVT_TOOLBOOK_PAGE_CHANGING; }
virtual void Realize() { m_toolbook->GetToolBar()->Realize(); } virtual void Realize() wxOVERRIDE { m_toolbook->GetToolBar()->Realize(); }
CPPUNIT_TEST_SUITE( ToolbookTestCase ); CPPUNIT_TEST_SUITE( ToolbookTestCase );
wxBOOK_CTRL_BASE_TESTS(); wxBOOK_CTRL_BASE_TESTS();

View File

@@ -27,16 +27,16 @@ class TreebookTestCase : public BookCtrlBaseTestCase, public CppUnit::TestCase
public: public:
TreebookTestCase() { } TreebookTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
virtual wxBookCtrlBase *GetBase() const { return m_treebook; } virtual wxBookCtrlBase *GetBase() const wxOVERRIDE { return m_treebook; }
virtual wxEventType GetChangedEvent() const virtual wxEventType GetChangedEvent() const wxOVERRIDE
{ return wxEVT_TREEBOOK_PAGE_CHANGED; } { return wxEVT_TREEBOOK_PAGE_CHANGED; }
virtual wxEventType GetChangingEvent() const virtual wxEventType GetChangingEvent() const wxOVERRIDE
{ return wxEVT_TREEBOOK_PAGE_CHANGING; } { return wxEVT_TREEBOOK_PAGE_CHANGING; }
CPPUNIT_TEST_SUITE( TreebookTestCase ); CPPUNIT_TEST_SUITE( TreebookTestCase );

View File

@@ -38,8 +38,8 @@ class TreeCtrlTestCase : public CppUnit::TestCase
public: public:
TreeCtrlTestCase() { } TreeCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( TreeCtrlTestCase ); CPPUNIT_TEST_SUITE( TreeCtrlTestCase );

View File

@@ -31,8 +31,8 @@ class TreeListCtrlTestCase : public CppUnit::TestCase
public: public:
TreeListCtrlTestCase() { } TreeListCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( TreeListCtrlTestCase ); CPPUNIT_TEST_SUITE( TreeListCtrlTestCase );

View File

@@ -33,8 +33,8 @@ class VirtListCtrlTestCase : public CppUnit::TestCase
public: public:
VirtListCtrlTestCase() { } VirtListCtrlTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( VirtListCtrlTestCase ); CPPUNIT_TEST_SUITE( VirtListCtrlTestCase );

View File

@@ -31,8 +31,8 @@ class WebTestCase : public CppUnit::TestCase
public: public:
WebTestCase() { } WebTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( WebTestCase ); CPPUNIT_TEST_SUITE( WebTestCase );

View File

@@ -31,8 +31,8 @@ class WindowTestCase : public CppUnit::TestCase
public: public:
WindowTestCase() { } WindowTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( WindowTestCase ); CPPUNIT_TEST_SUITE( WindowTestCase );

View File

@@ -55,14 +55,14 @@ void EventCloneTestCase::CheckAll()
for (; ci; ci = ci->GetNext()) for (; ci; ci = ci->GetNext())
{ {
wxString cn = wxString(ci->GetClassName()); wxString cn = wxString(ci->GetClassName());
// is this class derived from wxEvent? // is this class derived from wxEvent?
if ( !ci->IsKindOf(CLASSINFO(wxEvent)) || if ( !ci->IsKindOf(CLASSINFO(wxEvent)) ||
cn == "wxEvent" ) cn == "wxEvent" )
continue; continue;
const std::string const std::string
msg = std::string("Event class \"") + msg = std::string("Event class \"") +
std::string(cn.c_str()) + "\""; std::string(cn.c_str()) + "\"";
CPPUNIT_ASSERT_MESSAGE( msg, ci->IsDynamic() ); CPPUNIT_ASSERT_MESSAGE( msg, ci->IsDynamic() );

View File

@@ -197,8 +197,8 @@ class KeyboardEventTestCase : public CppUnit::TestCase
public: public:
KeyboardEventTestCase() {} KeyboardEventTestCase() {}
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( KeyboardEventTestCase ); CPPUNIT_TEST_SUITE( KeyboardEventTestCase );

View File

@@ -234,8 +234,8 @@ class EventPropagationTestCase : public CppUnit::TestCase
public: public:
EventPropagationTestCase() {} EventPropagationTestCase() {}
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( EventPropagationTestCase ); CPPUNIT_TEST_SUITE( EventPropagationTestCase );

View File

@@ -32,8 +32,8 @@ class DirTestCase : public CppUnit::TestCase
public: public:
DirTestCase() { } DirTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( DirTestCase ); CPPUNIT_TEST_SUITE( DirTestCase );
@@ -181,7 +181,7 @@ void DirTestCase::DirExists()
{ {
const char *dirname; const char *dirname;
bool shouldExist; bool shouldExist;
} testData[] = } testData[] =
{ {
{ ".", true }, { ".", true },
{ "..", true }, { "..", true },

View File

@@ -33,8 +33,8 @@ class FileFunctionsTestCase : public CppUnit::TestCase
{ {
public: public:
FileFunctionsTestCase() { } FileFunctionsTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( FileFunctionsTestCase ); CPPUNIT_TEST_SUITE( FileFunctionsTestCase );
@@ -453,7 +453,7 @@ void FileFunctionsTestCase::FileEof()
bool failed = true; bool failed = true;
try try
{ {
file.Eof(); file.Eof();
failed = false; failed = false;
} }
catch (...) catch (...)

View File

@@ -73,7 +73,7 @@ class FileKindTestCase : public CppUnit::TestCase
}; };
// test a wxFFile and wxFFileInput/OutputStreams of a known type // test a wxFFile and wxFFileInput/OutputStreams of a known type
// //
void FileKindTestCase::TestFILE(wxFFile& file, bool expected) void FileKindTestCase::TestFILE(wxFFile& file, bool expected)
{ {
CPPUNIT_ASSERT(file.IsOpened()); CPPUNIT_ASSERT(file.IsOpened());
@@ -191,7 +191,7 @@ void FileKindTestCase::MemoryStream()
} }
// Stdin will usually be a terminal, if so then test it // Stdin will usually be a terminal, if so then test it
// //
void FileKindTestCase::Stdin() void FileKindTestCase::Stdin()
{ {
if (isatty(0)) if (isatty(0))

View File

@@ -665,7 +665,7 @@ void FileNameTestCase::TestCreateTempFileName()
if (testData[n].shouldSucceed) if (testData[n].shouldSucceed)
{ {
errDesc += "; path is " + path.ToStdString(); errDesc += "; path is " + path.ToStdString();
// test the place where the temp file has been created // test the place where the temp file has been created
wxString expected = testData[n].expectedFolder; wxString expected = testData[n].expectedFolder;
expected.Replace("$SYSTEM_TEMP", wxStandardPaths::Get().GetTempDir()); expected.Replace("$SYSTEM_TEMP", wxStandardPaths::Get().GetTempDir());
@@ -688,7 +688,7 @@ void FileNameTestCase::TestGetTimes()
wxDateTime dtAccess, dtMod, dtCreate; wxDateTime dtAccess, dtMod, dtCreate;
CPPUNIT_ASSERT( fn.GetTimes(&dtAccess, &dtMod, &dtCreate) ); CPPUNIT_ASSERT( fn.GetTimes(&dtAccess, &dtMod, &dtCreate) );
// make sure all retrieved dates are equal to the current date&time // make sure all retrieved dates are equal to the current date&time
// with an accuracy up to 1 minute // with an accuracy up to 1 minute
CPPUNIT_ASSERT(dtCreate.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1))); CPPUNIT_ASSERT(dtCreate.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1)));
CPPUNIT_ASSERT(dtMod.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1))); CPPUNIT_ASSERT(dtMod.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1)));

View File

@@ -438,8 +438,8 @@ class FileSystemWatcherTestCase : public CppUnit::TestCase
public: public:
FileSystemWatcherTestCase() { } FileSystemWatcherTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
protected: protected:
wxEventLoopBase* m_loop; wxEventLoopBase* m_loop;

View File

@@ -121,7 +121,7 @@ public:
{ {
} }
virtual void setUp() virtual void setUp() wxOVERRIDE
{ {
m_bmpOrig = wxBitmap(m_imgOrig); m_bmpOrig = wxBitmap(m_imgOrig);
m_bmpUsingMatrix.Create(m_bmpOrig.GetSize(), m_bmpOrig.GetDepth()); m_bmpUsingMatrix.Create(m_bmpOrig.GetSize(), m_bmpOrig.GetDepth());

View File

@@ -37,8 +37,8 @@ class BitmapTestCase : public CppUnit::TestCase
public: public:
BitmapTestCase() { } BitmapTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( BitmapTestCase ); CPPUNIT_TEST_SUITE( BitmapTestCase );

View File

@@ -47,7 +47,7 @@ public:
m_bmp = wxNullBitmap; m_bmp = wxNullBitmap;
} }
virtual void setUp() virtual void setUp() wxOVERRIDE
{ {
m_gcdc->ResetBoundingBox(); m_gcdc->ResetBoundingBox();
} }

View File

@@ -127,7 +127,7 @@ public:
{ {
} }
virtual void setUp() { wxASSERT( m_dc ); } virtual void setUp() wxOVERRIDE { wxASSERT( m_dc ); }
virtual wxDC* GetDC(wxMemoryDC* dc) = 0; virtual wxDC* GetDC(wxMemoryDC* dc) = 0;
protected: protected:

View File

@@ -35,8 +35,8 @@ class HtmlWindowTestCase : public CppUnit::TestCase
public: public:
HtmlWindowTestCase() { } HtmlWindowTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( HtmlWindowTestCase ); CPPUNIT_TEST_SUITE( HtmlWindowTestCase );

View File

@@ -95,7 +95,7 @@ void InteractiveInputTestCase::TestDiskInfo()
// kill the last '\n' // kill the last '\n'
pathname[wxStrlen(pathname) - 1] = 0; pathname[wxStrlen(pathname) - 1] = 0;
if (pathname[0] == '\0' || wxStrcmp(pathname, "quit") == 0) if (pathname[0] == '\0' || wxStrcmp(pathname, "quit") == 0)
break; break;
@@ -111,7 +111,7 @@ void InteractiveInputTestCase::TestDiskInfo()
(free / 1024).ToString().c_str(), (free / 1024).ToString().c_str(),
pathname); pathname);
} }
wxPuts("\n"); wxPuts("\n");
} }
@@ -128,7 +128,7 @@ void InteractiveInputTestCase::TestDiskInfo()
void InteractiveInputTestCase::TestRegExInteractive() void InteractiveInputTestCase::TestRegExInteractive()
{ {
#ifdef TEST_REGEX #ifdef TEST_REGEX
wxPuts(wxT("*** Testing RE interactively ***")); wxPuts(wxT("*** Testing RE interactively ***"));
for ( ;; ) for ( ;; )
@@ -143,7 +143,7 @@ void InteractiveInputTestCase::TestRegExInteractive()
if (pattern[0] == '\0' || wxStrcmp(pattern, "quit") == 0) if (pattern[0] == '\0' || wxStrcmp(pattern, "quit") == 0)
break; break;
wxRegEx re; wxRegEx re;
if ( !re.Compile(pattern) ) if ( !re.Compile(pattern) )
{ {
@@ -181,7 +181,7 @@ void InteractiveInputTestCase::TestRegExInteractive()
} }
} }
} }
wxPuts("\n"); wxPuts("\n");
} }
#endif // TEST_REGEX #endif // TEST_REGEX
@@ -237,7 +237,7 @@ void InteractiveInputTestCase::TestFtpInteractive()
wxPrintf(wxT("--- Connected to %s, current directory is '%s'\n"), wxPrintf(wxT("--- Connected to %s, current directory is '%s'\n"),
hostname, ftp.Pwd().c_str()); hostname, ftp.Pwd().c_str());
} }
wxChar buf[128]; wxChar buf[128];
for ( ;; ) for ( ;; )
{ {
@@ -250,7 +250,7 @@ void InteractiveInputTestCase::TestFtpInteractive()
if (buf[0] == '\0' || wxStrcmp(buf, "quit") == 0) if (buf[0] == '\0' || wxStrcmp(buf, "quit") == 0)
break; break;
// special handling of LIST and NLST as they require data connection // special handling of LIST and NLST as they require data connection
wxString start(buf, 4); wxString start(buf, 4);
start.MakeUpper(); start.MakeUpper();
@@ -316,7 +316,7 @@ void InteractiveInputTestCase::TestDateTimeInteractive()
// kill the last '\n' // kill the last '\n'
buf[wxStrlen(buf) - 1] = 0; buf[wxStrlen(buf) - 1] = 0;
if ( buf[0] == '\0' || wxStrcmp(buf, "quit") == 0 ) if ( buf[0] == '\0' || wxStrcmp(buf, "quit") == 0 )
break; break;
@@ -340,7 +340,7 @@ void InteractiveInputTestCase::TestDateTimeInteractive()
dt.GetWeekOfMonth(wxDateTime::Sunday_First), dt.GetWeekOfMonth(wxDateTime::Sunday_First),
dt.GetWeekOfYear(wxDateTime::Monday_First)); dt.GetWeekOfYear(wxDateTime::Monday_First));
} }
wxPuts("\n"); wxPuts("\n");
#endif // TEST_DATETIME #endif // TEST_DATETIME
} }
@@ -375,7 +375,7 @@ void InteractiveInputTestCase::TestSingleIstance()
{ {
wxPrintf(wxT("Failed to init wxSingleInstanceChecker.\n")); wxPrintf(wxT("Failed to init wxSingleInstanceChecker.\n"));
} }
wxPuts("\n"); wxPuts("\n");
#endif // defined(TEST_SNGLINST) #endif // defined(TEST_SNGLINST)
} }

View File

@@ -33,8 +33,8 @@ class IntlTestCase : public CppUnit::TestCase
public: public:
IntlTestCase() { m_locale=NULL; } IntlTestCase() { m_locale=NULL; }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( IntlTestCase ); CPPUNIT_TEST_SUITE( IntlTestCase );

View File

@@ -159,8 +159,8 @@ class LogTestCase : public CppUnit::TestCase
public: public:
LogTestCase() { } LogTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( LogTestCase ); CPPUNIT_TEST_SUITE( LogTestCase );

View File

@@ -77,8 +77,8 @@ class MenuTestCase : public CppUnit::TestCase
public: public:
MenuTestCase() {} MenuTestCase() {}
virtual void setUp() { CreateFrame(); } virtual void setUp() wxOVERRIDE { CreateFrame(); }
virtual void tearDown() { m_frame->Destroy(); } virtual void tearDown() wxOVERRIDE { m_frame->Destroy(); }
private: private:
CPPUNIT_TEST_SUITE( MenuTestCase ); CPPUNIT_TEST_SUITE( MenuTestCase );

View File

@@ -77,7 +77,7 @@ void DynamicLibraryTestCase::Load()
typedef int (wxSTDCALL *wxStrlenType)(const char *); typedef int (wxSTDCALL *wxStrlenType)(const char *);
wxStrlenType pfnStrlen = (wxStrlenType)lib.GetSymbol(FUNC_NAME); wxStrlenType pfnStrlen = (wxStrlenType)lib.GetSymbol(FUNC_NAME);
wxString errMsg = wxString::Format("ERROR: function '%s' wasn't found in '%s'.\n", wxString errMsg = wxString::Format("ERROR: function '%s' wasn't found in '%s'.\n",
FUNC_NAME, LIB_NAME); FUNC_NAME, LIB_NAME);
CPPUNIT_ASSERT_MESSAGE( errMsg.ToStdString(), pfnStrlen ); CPPUNIT_ASSERT_MESSAGE( errMsg.ToStdString(), pfnStrlen );

View File

@@ -68,7 +68,7 @@ void EnvTestCase::GetSet()
void EnvTestCase::Path() void EnvTestCase::Path()
{ {
wxString contents; wxString contents;
CPPUNIT_ASSERT(wxGetEnv(wxT("PATH"), &contents)); CPPUNIT_ASSERT(wxGetEnv(wxT("PATH"), &contents));
CPPUNIT_ASSERT(!contents.empty()); CPPUNIT_ASSERT(!contents.empty());
} }

View File

@@ -28,7 +28,7 @@ TEST_CASE("wxPathList::FindValidPath", "[file][path]")
wxPathList pathlist; wxPathList pathlist;
pathlist.AddEnvList(wxT("PATH")); pathlist.AddEnvList(wxT("PATH"));
wxString path = pathlist.FindValidPath(CMD_IN_PATH); wxString path = pathlist.FindValidPath(CMD_IN_PATH);
INFO( CMD_IN_PATH " not found in " << wxGetenv("PATH") ); INFO( CMD_IN_PATH " not found in " << wxGetenv("PATH") );
CHECK( !path.empty() ); CHECK( !path.empty() );

View File

@@ -27,13 +27,13 @@ class SelStoreTestCase : public CppUnit::TestCase
public: public:
SelStoreTestCase() { m_store = NULL; } SelStoreTestCase() { m_store = NULL; }
virtual void setUp() virtual void setUp() wxOVERRIDE
{ {
m_store = new wxSelectionStore; m_store = new wxSelectionStore;
m_store->SetItemCount(NUM_ITEMS); m_store->SetItemCount(NUM_ITEMS);
} }
virtual void tearDown() virtual void tearDown() wxOVERRIDE
{ {
delete m_store; delete m_store;
m_store = NULL; m_store = NULL;

View File

@@ -42,7 +42,7 @@ private:
void GetColour(); void GetColour();
void GetFont(); void GetFont();
// not really wxSystemSettings stuff but still nice to test: // not really wxSystemSettings stuff but still nice to test:
void GlobalColours(); void GlobalColours();
void GlobalFonts(); void GlobalFonts();
@@ -67,7 +67,7 @@ void SettingsTestCase::GetColour()
void SettingsTestCase::GetFont() void SettingsTestCase::GetFont()
{ {
const wxSystemFont ids[] = const wxSystemFont ids[] =
{ {
wxSYS_OEM_FIXED_FONT, wxSYS_OEM_FIXED_FONT,
wxSYS_ANSI_FIXED_FONT, wxSYS_ANSI_FIXED_FONT,

View File

@@ -33,8 +33,8 @@ class BoxSizerTestCase : public CppUnit::TestCase
public: public:
BoxSizerTestCase() { } BoxSizerTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( BoxSizerTestCase ); CPPUNIT_TEST_SUITE( BoxSizerTestCase );

View File

@@ -33,8 +33,8 @@ class GridSizerTestCase : public CppUnit::TestCase
public: public:
GridSizerTestCase() { } GridSizerTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( GridSizerTestCase ); CPPUNIT_TEST_SUITE( GridSizerTestCase );

View File

@@ -33,8 +33,8 @@ class WrapSizerTestCase : public CppUnit::TestCase
public: public:
WrapSizerTestCase() { } WrapSizerTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( WrapSizerTestCase ); CPPUNIT_TEST_SUITE( WrapSizerTestCase );

View File

@@ -65,9 +65,9 @@ protected:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxFFileInputStream *DoCreateInStream(); virtual wxFFileInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxFFileOutputStream *DoCreateOutStream(); virtual wxFFileOutputStream *DoCreateOutStream() wxOVERRIDE;
virtual void DoDeleteOutStream(); virtual void DoDeleteOutStream() wxOVERRIDE;
private: private:
wxString GetInFileName() const; wxString GetInFileName() const;

View File

@@ -65,9 +65,9 @@ protected:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxFileInputStream *DoCreateInStream(); virtual wxFileInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxFileOutputStream *DoCreateOutStream(); virtual wxFileOutputStream *DoCreateOutStream() wxOVERRIDE;
virtual void DoDeleteOutStream(); virtual void DoDeleteOutStream() wxOVERRIDE;
private: private:
wxString GetInFileName() const; wxString GetInFileName() const;

View File

@@ -29,7 +29,7 @@ class IOStreamsTestCase : public CppUnit::TestCase
public: public:
IOStreamsTestCase() { } IOStreamsTestCase() { }
virtual void tearDown() virtual void tearDown() wxOVERRIDE
{ {
if ( !m_fnTemp.empty() ) if ( !m_fnTemp.empty() )
{ {

View File

@@ -70,8 +70,8 @@ private:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxMemoryInputStream *DoCreateInStream(); virtual wxMemoryInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxMemoryOutputStream *DoCreateOutStream(); virtual wxMemoryOutputStream *DoCreateOutStream() wxOVERRIDE;
private: private:
char m_DataBuffer[DATABUFFER_SIZE]; char m_DataBuffer[DATABUFFER_SIZE];

View File

@@ -103,8 +103,8 @@ public:
socketStream(); socketStream();
virtual ~socketStream(); virtual ~socketStream();
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
// repeat all socket tests several times with different socket flags, so we // repeat all socket tests several times with different socket flags, so we
// define this macro which is used several times in the test suite // define this macro which is used several times in the test suite
@@ -137,8 +137,8 @@ public:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxSocketInputStream *DoCreateInStream(); virtual wxSocketInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxSocketOutputStream *DoCreateOutStream(); virtual wxSocketOutputStream *DoCreateOutStream() wxOVERRIDE;
// socket thread functions // socket thread functions
static void WriteSocket(wxSocketBase& socket) static void WriteSocket(wxSocketBase& socket)

View File

@@ -63,8 +63,8 @@ protected:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxStringInputStream *DoCreateInStream(); virtual wxStringInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxStringOutputStream *DoCreateOutStream(); virtual wxStringOutputStream *DoCreateOutStream() wxOVERRIDE;
// output the given string to wxStringOutputStream and check that its // output the given string to wxStringOutputStream and check that its
// contents is exactly the same string // contents is exactly the same string

View File

@@ -119,10 +119,10 @@ private:
private: private:
// Implement base class functions. // Implement base class functions.
virtual wxZlibInputStream *DoCreateInStream(); virtual wxZlibInputStream *DoCreateInStream() wxOVERRIDE;
virtual wxZlibOutputStream *DoCreateOutStream(); virtual wxZlibOutputStream *DoCreateOutStream() wxOVERRIDE;
virtual void DoDeleteInStream(); virtual void DoDeleteInStream() wxOVERRIDE;
virtual void DoDeleteOutStream(); virtual void DoDeleteOutStream() wxOVERRIDE;
// Helper that can be used to create new wx compatibility tests... // Helper that can be used to create new wx compatibility tests...
// Otherwise not used by the tests. // Otherwise not used by the tests.

View File

@@ -28,7 +28,7 @@ class NumFormatterTestCase : public CppUnit::TestCase
public: public:
NumFormatterTestCase() { m_locale = NULL; } NumFormatterTestCase() { m_locale = NULL; }
virtual void setUp() virtual void setUp() wxOVERRIDE
{ {
// We need to use a locale with known decimal point and which uses the // We need to use a locale with known decimal point and which uses the
// thousands separator for the tests to make sense. // thousands separator for the tests to make sense.
@@ -38,7 +38,7 @@ public:
tearDown(); tearDown();
} }
virtual void tearDown() virtual void tearDown() wxOVERRIDE
{ {
delete m_locale; delete m_locale;
m_locale = NULL; m_locale = NULL;

View File

@@ -1156,4 +1156,4 @@ void UniCharTestCase::RefWideCharCompare()
wxUNICHARREF_TEST_INT_COMPARE wxUNICHARREF_TEST_INT_COMPARE
} }
#endif #endif

View File

@@ -166,7 +166,7 @@ private:
#endif #endif
void Unicode(); void Unicode();
template<typename T> template<typename T>
void DoBigToSmallBuffer(T *buffer, int size); void DoBigToSmallBuffer(T *buffer, int size);
void BigToSmallBuffer(); void BigToSmallBuffer();
@@ -251,12 +251,12 @@ void VsnprintfTestCase::P()
CMP3i("0000ABCDEFABCDEF", "%p", (void*)0xABCDEFABCDEF); CMP3i("0000ABCDEFABCDEF", "%p", (void*)0xABCDEFABCDEF);
CMP3("0000000000000000", "%p", (void*)NULL); CMP3("0000000000000000", "%p", (void*)NULL);
#endif #endif
#elif defined(__MINGW32__) #elif defined(__MINGW32__)
// mingw32 uses MSVC CRT in old versions but is own implementation now // mingw32 uses MSVC CRT in old versions but is own implementation now
// which is somewhere in the middle as it uses %8x, so to catch both cases // which is somewhere in the middle as it uses %8x, so to catch both cases
// we use case-insensitive comparison here. // we use case-insensitive comparison here.
CMP3("0xabcdef", "%p", (void*)0xABCDEF); CMP3("0xabcdef", "%p", (void*)0xABCDEF);
CMP3("0", "%p", (void*)NULL); CMP3("0", "%p", (void*)NULL);
#elif defined(__GNUG__) #elif defined(__GNUG__)
// glibc prints pointers as %#x except for NULL pointers which are printed // glibc prints pointers as %#x except for NULL pointers which are printed
// as '(nil)'. // as '(nil)'.

View File

@@ -359,9 +359,9 @@ extern bool IsNetworkAvailable()
// NOTE: we could use wxDialUpManager here if it was in wxNet; since it's in // NOTE: we could use wxDialUpManager here if it was in wxNet; since it's in
// wxCore we use a simple rough test: // wxCore we use a simple rough test:
wxSocketBase::Initialize(); wxSocketBase::Initialize();
wxIPV4address addr; wxIPV4address addr;
if (!addr.Hostname("www.google.com") || !addr.Service("www")) if (!addr.Hostname("www.google.com") || !addr.Service("www"))
{ {
@@ -372,9 +372,9 @@ extern bool IsNetworkAvailable()
wxSocketClient sock; wxSocketClient sock;
sock.SetTimeout(10); // 10 secs sock.SetTimeout(10); // 10 secs
bool online = sock.Connect(addr); bool online = sock.Connect(addr);
wxSocketBase::Shutdown(); wxSocketBase::Shutdown();
return online; return online;
} }

View File

@@ -40,7 +40,7 @@ public:
srand((unsigned)time(NULL)); srand((unsigned)time(NULL));
} }
virtual void tearDown() { unlink(GetTestFileName()); } virtual void tearDown() wxOVERRIDE { unlink(GetTestFileName()); }
private: private:
CPPUNIT_TEST_SUITE( TextFileTestCase ); CPPUNIT_TEST_SUITE( TextFileTestCase );

View File

@@ -246,7 +246,7 @@ void MiscThreadTestCase::TestJoinable()
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread.Run() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread.Run() );
CPPUNIT_ASSERT_EQUAL( 362880, (unsigned long)thread.Wait() ); CPPUNIT_ASSERT_EQUAL( 362880, (unsigned long)thread.Wait() );
} }
void MiscThreadTestCase::TestDetached() void MiscThreadTestCase::TestDetached()
{ {
static const size_t nThreads = 3; static const size_t nThreads = 3;
@@ -330,31 +330,31 @@ void MiscThreadTestCase::TestThreadDelete()
// terminated will lead to a crash! // terminated will lead to a crash!
MyDetachedThread *thread0 = new MyDetachedThread(30, 'W'); MyDetachedThread *thread0 = new MyDetachedThread(30, 'W');
CPPUNIT_ASSERT_EQUAL( wxTHREAD_MISC_ERROR, thread0->Delete() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_MISC_ERROR, thread0->Delete() );
// delete a thread which didn't start to run yet. // delete a thread which didn't start to run yet.
MyDetachedThread *thread1 = new MyDetachedThread(30, 'Y'); MyDetachedThread *thread1 = new MyDetachedThread(30, 'Y');
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread1->Run() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread1->Run() );
wxMilliSleep(300); wxMilliSleep(300);
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread1->Delete() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread1->Delete() );
// delete a running thread // delete a running thread
MyDetachedThread *thread2 = new MyDetachedThread(30, 'Z'); MyDetachedThread *thread2 = new MyDetachedThread(30, 'Z');
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Run() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Run() );
wxMilliSleep(300); wxMilliSleep(300);
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Pause() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Pause() );
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Delete() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread2->Delete() );
// delete a sleeping thread // delete a sleeping thread
MyJoinableThread thread3(20); MyJoinableThread thread3(20);
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread3.Run() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread3.Run() );
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread3.Delete() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread3.Delete() );
// delete a joinable running thread // delete a joinable running thread
MyJoinableThread thread4(2); MyJoinableThread thread4(2);
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread4.Run() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread4.Run() );
wxMilliSleep(300); wxMilliSleep(300);
CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread4.Delete() ); CPPUNIT_ASSERT_EQUAL( wxTHREAD_NO_ERROR, thread4.Delete() );
// delete a joinable thread which already terminated // delete a joinable thread which already terminated
} }

View File

@@ -30,7 +30,7 @@
class URLTestCase : public CppUnit::TestCase class URLTestCase : public CppUnit::TestCase
{ {
public: public:
URLTestCase(); URLTestCase();
~URLTestCase(); ~URLTestCase();
private: private:

View File

@@ -30,8 +30,8 @@ class NumValidatorTestCase : public CppUnit::TestCase
public: public:
NumValidatorTestCase() { } NumValidatorTestCase() { }
void setUp(); void setUp() wxOVERRIDE;
void tearDown(); void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( NumValidatorTestCase ); CPPUNIT_TEST_SUITE( NumValidatorTestCase );

View File

@@ -30,8 +30,8 @@ class ClientSizeTestCase : public CppUnit::TestCase
public: public:
ClientSizeTestCase() { } ClientSizeTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( ClientSizeTestCase ); CPPUNIT_TEST_SUITE( ClientSizeTestCase );

View File

@@ -32,8 +32,8 @@ class SetSizeTestCase : public CppUnit::TestCase
public: public:
SetSizeTestCase() { } SetSizeTestCase() { }
virtual void setUp(); virtual void setUp() wxOVERRIDE;
virtual void tearDown(); virtual void tearDown() wxOVERRIDE;
private: private:
CPPUNIT_TEST_SUITE( SetSizeTestCase ); CPPUNIT_TEST_SUITE( SetSizeTestCase );

View File

@@ -139,8 +139,8 @@ class XrcTestCase : public CppUnit::TestCase
public: public:
XrcTestCase() {} XrcTestCase() {}
virtual void setUp() { CreateXrc(); } virtual void setUp() wxOVERRIDE { CreateXrc(); }
virtual void tearDown() { wxRemoveFile(TEST_XRC_FILE); } virtual void tearDown() wxOVERRIDE { wxRemoveFile(TEST_XRC_FILE); }
private: private:
CPPUNIT_TEST_SUITE( XrcTestCase ); CPPUNIT_TEST_SUITE( XrcTestCase );