Commit Graph

17 Commits

Author SHA1 Message Date
Vadim Zeitlin
8534ec4699 Get rid of an unnecessary function in wxWindow unit test
No real changes, just inline a short function only used once.
2019-10-17 22:01:36 +02:00
Vadim Zeitlin
c810bfad47 Move WaitForPaint helper into a header
No real changes, just make this class, used in wxWindow::SetSize() tests
only so far, reusable in the other tests.
2019-10-17 21:59:06 +02:00
Vadim Zeitlin
7d6d514984 Improve WaitForPaint helper used in window unit tests
Unbind the event handler referencing a local variable, as leaving it
bound could result in a crash later if another paint event was generated
for the window for whatever reason.

Doing it like this requires using 2 different objects, but the
complexity can be still hidden inside WaitForPaint class, with the 2nd
object being just a member of it, and, in fact, makes the code using it
simpler as it doesn't need to use a boolean variable with it.
2019-10-17 17:07:00 +02:00
Vadim Zeitlin
35de675830 Extract waiting for the first paint event in a reusable function
No real changes, this is just a refactoring to allow reusing the same
loop waiting until we can get the real window geometry in other tests.

This commit is best viewed with --color-moved.
2019-09-22 00:56:23 +02:00
Vadim Zeitlin
da8cecbfe5 Add a unit test checking that Move() doesn't change frame size
This used to be broken in wxQt until it was fixed by the previous
commit.

See https://github.com/swig/swig/pull/1613
2019-09-22 00:50:32 +02:00
Vadim Zeitlin
baca938ce3 Rewrite SetSizeTestCase to not use CppUnit macros neither
Do the same thing as in the previous commit to another test.

No real changes.
2019-09-22 00:50:32 +02:00
Vadim Zeitlin
3a4538a18c Rewrite client size unit test without using CppUnit macros
No real changes, just simplify the test.
2019-09-22 00:50:23 +02:00
Maarten Bent
7c1ab06ea5 Add more wxOVERRIDE 2018-09-22 14:44:07 +02:00
Maarten Bent
57180d68c8 Add wxOVERRIDE to test files
And cleanup some tailing spaces and tabs.
2018-07-29 12:08:53 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
054fdb68eb Honour window min and max sizes in wxWindow::GetBestSize().
The best size of the window should be at least as large as its min size and
less than its max size. This allows to override the windows own best size
determination with an explicit SetMinSize() or SetMaxSize() call.

See #11497.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-15 23:34:18 +00:00
Vadim Zeitlin
352a7d6c46 Ensure that we never return negative client size.
wxMSW could return negative client size for tiny windows with borders, this
was unexpected and shouldn't happen so explicitly ensure it does not.

Also add a unit test to check that this problem doesn't exist in other ports.

Closes #13184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67754 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-16 14:07:40 +00:00
Dimitri Schoolwerth
e3778b4d9c No code changes, fixed some typos.
Changed several occurrences of "it's" where "its" is meant, as well as a few other minor typos.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-30 10:57:04 +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
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
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