Commit Graph

36 Commits

Author SHA1 Message Date
Vadim Zeitlin
232fdc630c Merge the new GUI tests from SOC2010_GUI_TEST branch.
Add a lot of tests for many wx GUI classes.

Add tests using the new wxUIActionSimulator class but disable them under OS X
as too many of them currently fail there.

Refactor the test suite to make organizing the existing tests and adding the
new ones easier.

Improve documentation using the information gathered while testing the
classes. Also update the documentation of the testing system itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-08-22 22:16:05 +00:00
Vadim Zeitlin
b0f73b6701 Really set svn:eol-style property.
The last commit used incorrect property name, remove the erroneous property
and set the correct svn:eol-style one.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-17 14:55:45 +00:00
Vadim Zeitlin
b6812a6f19 Add column parameter to wxListCtrl::GetItemText().
Allow retrieving the text from columns other than the first one directly.

Add implementations for MSW and generic versions, documentation and a unit
test.

Closes #11597.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-10 21:22:16 +00:00
Francesco Montorsi
32ee98eb76 reorder GetLabel(), GetLabelText(), SetLabel() and SetLabelText() function declarations, implementations and relative documentations.
Add wxStaticTextBase::GetLabelWithoutMarkup() and use it in the wxMSW implementation of wxStaticText::SetLabel() to close bug #11446; the function RemoveMarkup() which was previously used in fact could not check for presence/absence of wxST_MARKUP style since it's a static function.

Add wxStaticTextBase::SetLabelText() functions for symmetry with wxControlBase::SetLabelText()

Add test unit for both wxControl::*Label* and wxStaticText::*Label* functions.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-21 21:39:15 +00:00
Vadim Zeitlin
0772a89875 Ensure that setting wxChoice height to its default value does set it.
Setting wxChoice height to its default value didn't change the height even if
the current height was different from the default. This resulted in problems
when a wxChoice was used inside a wxAuiToolBar because AUI temporarily reduces
the toolbar size to (1, 1) when docking it (thus ensuring that the height of
wxChoice is changed too) and generally didn't make sense.

Fix this by resetting the height to the default value if the value passed to
wxChoice::SetSize() is what it considers to be its default height.

Add a unit test for this bug and also add a wxChoice to AUI sample to allow
testing for wxChoice behaviour inside a wxAuiToolBar being [un]docked.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63708 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:39 +00:00
Vadim Zeitlin
756c98b02e fix bug in generic wxTreeCtrl: calling SelectItem(true) on an already selected item shouldn't toggle its selection (see #10830)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 14:15:06 +00:00
Vadim Zeitlin
b7923f2ac1 add test checking that switching mode doesn't change the controls contents (see #9484)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-21 17:19:08 +00:00
Vadim Zeitlin
d911dc04ae only run tests using multiline strings with multiline text control; document that using multiline strings doesn't work with singleline controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 13:22:09 +00:00
Vadim Zeitlin
ffdb0ee5ab initialize NUM_COLS correctly in columns order test (closes #10630)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 12:18:51 +00:00
Vadim Zeitlin
306f34a368 allow using CPPUNIT_ASSERT_EQUAL(int,unsigned) even on 64 bit platforms (see r59576)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-17 22:02:56 +00:00
Francesco Montorsi
c653b0197a fix compilation with gcc 4.3.3 (and libcppunit 1.12.1); the compiler is confused by the many assertEqual() overloads
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-16 15:18:07 +00:00
Vadim Zeitlin
fa97ee2490 implement wxTreeCtrl::ItemHasChildren() properly for virtual root item; added unit test for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-17 13:16:25 +00:00
Francesco Montorsi
8d1a41016d assert when the item index is out of range in wxMSW's listctrl, just like generic listctrl does
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 19:34:42 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Francesco Montorsi
880706bedd disable test which asserted when trying to call wxListCtrl::GetItemRect() with an invalid index; not sure this is the best thing to do
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 17:40:32 +00:00
Vadim Zeitlin
c0ccc082e2 correct wrong #endif position which prevented ListCtrlTestCase::ItemRect() from being compiled under non-MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:58:41 +00:00
Vadim Zeitlin
0468a58a4b don't show assert message boxes in debug build but throw an exception if an assert unexpectedly fails; do check that expected asserts are generated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:28:55 +00:00
Vadim Zeitlin
6756186271 fix Get(Sub)ItemRect() after changes of r54437; added test for it (see #10175)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:13:58 +00:00
Vadim Zeitlin
3246a508ab don't test for best size not being 0, this doesn't pass under wxGTK
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 16:29:11 +00:00
Vadim Zeitlin
497c7dffd1 compilation fixes for Unix build _with_ PCH
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 16:21:49 +00:00
Vadim Zeitlin
71d8948f12 add unit test for column reordering functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-12 14:16:06 +00:00
Vadim Zeitlin
059979d848 fix wxTextCtrl::Replace() under wxGTK; added unit test for it and describe its effect on the insertion point
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-11 16:46:25 +00:00
Vadim Zeitlin
a1d4adc5ce use wxHeaderColumnSimple instead of wxHeaderColumn
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57162 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-07 15:58:59 +00:00
Vadim Zeitlin
e2bfe6731e - Rewrite wxHeaderCtrl to be virtual-like: even if we don't need an infinite
number of columns in it, it turns out that getting column information from
  the associated control is much easier than copying it into the control.
- Provide wxHeaderCtrlSimple derived class which can be used easily if
  callback approach of wxHeaderCtrl is not needed.
- Because of wxHeaderCtrl virtualization, port-specific implementations of
  wxHeaderColumn are not needed any more and were removed.
- Use wxHeaderCtrl in the generic wxDataViewCtrl: this means that column
  events are broken right now in it as they haven't been implemented by
  wxHeaderCtrl yet, this will be fixed a.s.a.p.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-07 14:47:55 +00:00
Vadim Zeitlin
20f4a2e41f forgot to update after renaming wxHeaderCtrlColumn to wxHeaderColumn
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57098 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-03 23:21:08 +00:00
Vadim Zeitlin
5e7078ad6f also disable the test of the generic version as it's not in the svn yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57095 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-03 21:56:49 +00:00
Vadim Zeitlin
56873923f3 extract (and expand and clean up and document) the header window implementation used inside the generic wxDataViewCtrl in a separate wxHeaderCtrl class which could be reused in (generic) wxListCtrl and, most importantly, wxGrid later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-03 21:53:10 +00:00
Vadim Zeitlin
80cc5fc7ad document column reordering in wxListCtrl; fix confusion between GetColumnOrder() and GetColumnIndexFromOrder() doing this discovered; show the use of these methods in the sample and added a unit test for them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-26 19:11:22 +00:00
Vadim Zeitlin
dc7f9c9cee add unit test for wxTextEntry methods of wxComboBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 10:18:30 +00:00
Vadim Zeitlin
f0f6a32d4d extract wxTextEntry unit tests in a reusable base class
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 08:55:25 +00:00
Vadim Zeitlin
5166d04e4f add unit test for wxTextCtrl::GetInsertionPoint()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54776 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-23 23:56:04 +00:00
Vadim Zeitlin
b2b0bee6d8 add unit test for wxTextCtrl::SetSelection()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-23 23:34:25 +00:00
Vadim Zeitlin
1de532f57e get rid of special WX_ASSERT_FOO_EQUAL macros by defining CppUnit::assertEquals() overloads for wx types
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-07-18 23:07:23 +00:00
Vadim Zeitlin
1a86d2e52c create tests/window directory for wxWindow tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-25 02:56:22 +00:00
Václav Slavík
301d7a0da6 added wxWindow::ClientToWindowSize and WindowToClientSize helpers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-12 15:49:22 +00:00
Vadim Zeitlin
c0d9b217a7 added unit test for some of wxTextCtrl methods and its events generation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-26 00:28:31 +00:00