Commit Graph

54 Commits

Author SHA1 Message Date
Vadim Zeitlin
9bb9964e26 Add a class for parsing simple markup.
This code is not used anywhere yet, this commit only adds the parser for the
markup and the related classes as well as the corresponding unit test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67048 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-27 12:46:42 +00:00
Vadim Zeitlin
e4c903b2ea Fix wxWrapSizer minimal size calculation.
Add a unit test checking that wxWrapSizer::CalcMin() returns the expected
results.

Closes #12464.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-08 13:36:13 +00:00
Vadim Zeitlin
00eef16d51 Rebake everything using bakefile 0.2.9.
Update configure and bakefile.m4 for the new version too.

Also add the missing makefiles and projects for the XTI sample.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-03 15:02:45 +00:00
Vadim Zeitlin
a54cf37118 Add wxIntegerValidator and wxFloatingPointValidator classes.
Add validators for integer and floating point numbers.

Add an example of their use to the validate sample as well as a new unit test
and documentation for them.

Use the new classes instead of wxTextValidator in wxGrid code.

Closes #12166.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66714 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-19 10:48:28 +00:00
Vadim Zeitlin
3625820490 Fixes for parsing invalid HTML without tag ends.
The code in wxHtmlParser supposed in many places that a '<' character must be
always followed by a '>' one and could create (and sometimes dereference)
invalid iterators if this wasn't the case resulting in asserts from MSVC debug
CRT and possibly crashes.

Fix this by ensuring that only valid iterators are used and add a trivial unit
test for wxHtmlParser which checks that it can parse invalid HTML without
crashing.

Closes #12869.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-01-13 14:49:55 +00:00
Jaakko Salli
997ddb2ced Added OwnerDrawnComboBoxTestCase (currently only has copies of wxComboBox tests)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-20 13:55:40 +00:00
Vadim Zeitlin
944f641cf9 Don't require leading TAB in wxAcceleratorEntry::FromString().
FromString() should parse string returned by ToString() successfully but this
wasn't the case because the accelerator parsing functions always insisted on
having a TAB in the string.

Fix this, document the string format and add a unit test checking for the
correct behaviour.

Closes #12745.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-12-03 12:39:57 +00:00
Vadim Zeitlin
68ebe2620f Add wx(Simple)HtmlListBox unit test.
For now just test the wxItemContainer methods.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66276 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-27 11:34:34 +00:00
Vadim Zeitlin
681694bca9 Add a unit test checking selection updating in virtual wxListCtrl.
Verify that the selection is updated correctly after the number of items in
the control is decreased.

See #12378.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66141 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:03:20 +00:00
Vadim Zeitlin
65571ec7bf Add a beginning of wxMenu unit test.
Test wxMenu and wxMenuBar item search and counting functions.

See #12672.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66139 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-13 15:03:02 +00:00
Vadim Zeitlin
0526c8cc07 Add support for id ranges to XRC.
Allow to declare ranges of consecutive IDs in XRC by using the "id[n]" syntax.
Show this functionality in the xrc sample and test it in the new unit test.

Also show and test the "object reference" XRC functionality.

Closes #11431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66059 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-11-07 14:00:59 +00:00
Vadim Zeitlin
042ddf5def Add a simple test for keyboard events generation.
Check that the events generated by wxUIActionSimulator result in the same
wxKeyEvents being generated under all platforms. This is not the same as
checking the event generation for the actual keys pressed by the user as there
are some small differences between the two but better than nothing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-11 10:18:31 +00:00
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
Václav Slavík
b796194b15 Regenerated makefiles after removing USE_GDIPLUS.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 14:14:26 +00:00
Vadim Zeitlin
27297c823a Implement wxMask copy ctor for wxGTK.
Without copy ctor copying masks simply crashed because the same pointer was
deleted twice.

Also added a (completely trivial but better than nothing...) unit test for
wxBitmap to check that copying masks does work now.

Closes #11854.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-28 23:20:49 +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
869c7a944b Add (a very simple for now) wxBoxSizer unit test.
Only check that layout for a single sizer item works correctly for now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-18 15:07:10 +00:00
Francesco Montorsi
a37da0fa55 Fix function wxControlBase::DoEllipsizeSingleLine to really make sure that the ellipsized string takes less pixels than maxFinalWidthPx.
Add comments to explain in more details what the function does and in particular the valid ranges of all internal variables; fix in that regard both the code of both wxELLIPSIZE_START, wxELLIPSIZE_MIDDLE and wxELLIPSIZE_END.
Add more asserts to check the valid ranges and turn a couple of time-expensive checks in level-2 asserts.
Add a test unit for the wxControl::Ellipsize function.
Fix minor details in the docs of wxControl::Ellipsize.
Closes #11567.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63660 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-10 13:57:47 +00:00
Kevin Ollivier
da8b1d4b3b Rebake from clean wx tree.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63052 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-01-04 00:45:45 +00:00
Kevin Ollivier
f82b7036e8 Rebake after last commit.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-11-18 19:22:58 +00:00
Kevin Ollivier
a7ebaf0ddd Bakefile 0.2.8 rebake.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-31 20:56:47 +00:00
Vadim Zeitlin
7880889720 Rebake everything using bakefile 0.2.7.
Also updated aclocal inputs and regenerated configure.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-10-22 16:53:10 +00:00
Vadim Zeitlin
b0edecea48 Add wxColour::{Set,Get}RGB[A]().
These methods allow to operate with all 3 or 4 colour channels at once.

Add their implementation, documentation and a unit test for wxColour
exercising them.

Closes #9918.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-19 16:29:50 +00:00
Vadim Zeitlin
d12d9edacb Rebake all the samples, demos and tests makefiles.
This should have been committed together with the changes to the debug flags
handling in build/bakefiles in r61887.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-12 13:38:08 +00:00
Francesco Montorsi
21fe35aff7 add wxImage test units to test loading from both seekable and non-seekable streams
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 11:46:36 +00:00
Chris Elliott
95ff11c4bb update bakefile to 0.2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-24 10:36:24 +00:00
Vadim Zeitlin
b3710b1030 rebake after the addition of graphics/measuring.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 14:49:28 +00:00
Francesco Montorsi
e3527f7bc5 make sure that wxSystemSettings::GetFont/GetColour return values are always valid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 23:13:02 +00:00
Francesco Montorsi
ca5016d4dd make sure that wxProcess always have a valid PID set; add test unit for wxExecute,wxShell,wxProcess based on the code in the console sample; add some more infos/notes in wxProcess docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 16:23:44 +00:00
Vadim Zeitlin
031b101f09 moved the check for correct implementation of wxEvent::Clone() to a unit test from wx startup code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 21:31:34 +00:00
Francesco Montorsi
5b06a80f9f add a wxFont test unit (currently GetFamily and the Get/SetEncoding() bits are disabled because they fail on wxGTK -- need more investigation)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-18 15:32:28 +00:00
Vadim Zeitlin
4fc218c2a7 move evthandler.cpp to non-GUI test as it doesn't require the GUI
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 23:20:27 +00:00
Vadim Zeitlin
b2238cc315 add a unit test for new events (see #10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 22:12:12 +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
Vadim Zeitlin
1649d2886b add a unit test checking that events are really propagated as they're supposed to
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 16:21:50 +00:00
Vadim Zeitlin
b44f5137ce link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-15 13:33:51 +00:00
Francesco Montorsi
9e48b1f56c add the 'GarbageTestCase' which helped me to spot some buggy load routines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-11 00:39:22 +00:00
Vadim Zeitlin
1156062f77 also include wxSocket test in the GUI test as different event loop implementations may be used for console and GUI apps resulting in different bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 11:14:10 +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
506e9b7ed2 rebaked using bakefile 0.2.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-27 16:40:51 +00:00
Václav Slavík
c39058f631 added a test to check if wxHtmlWindow::SelectionToText() inserts \n characters correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-15 15:55:25 +00:00
Vadim Zeitlin
8ece421c6c rebaked makefiles with 0.2.4
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-10-08 15:44:49 +00:00
Vadim Zeitlin
841a25bbc3 added a simple test for wxGetDisplayXXX() functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-22 16:03:45 +00:00
Kevin Ollivier
7664a67f57 Rebake after bakefile changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-20 23:59:10 +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
99b9c0eac1 do enable PCH for the tests, wx/wx.h was not precompiled for them resulting in much slower compilation than expected
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55729 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-19 09:03:01 +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
3e50a139b4 fixed wxImagePixelData compilation (ticket #3003); added a unit test for it (to be extended to cover more wxImage methods...)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-30 19:30:23 +00:00
Vadim Zeitlin
5af86f4df5 don't take the min size into account when setting the window size explicitly in wxGTK, just as wxMSW doesn't do it; mention this in the docs and added a unit test to enforce this
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-25 03:08:31 +00:00