Commit Graph

1549 Commits

Author SHA1 Message Date
Vadim Zeitlin
3e67b1ef68 Fix the unit test suite exit code in case of failure.
Return the program exit code from the (overridden) OnRun(), not OnExit(),
doing it from the latter didn't work since many years.

The failures in the GUI tests will be detected by buildbot now.
2015-04-12 17:51:30 +02:00
Vadim Zeitlin
e8d969244e Check for "buildbot" user in IsAutomaticTest().
The new buildbot setup runs the code under this user, so adjust the check for
running under buildbot to detect it.
2015-04-12 17:40:10 +02:00
Vadim Zeitlin
31d1644daa Finally do fix use of wxTranslateFromUnicodeFormat() in the unit test.
Don't reference the never defined function in the test any more.

(This does) close #16118.
2015-04-10 17:51:01 +02:00
Vadim Zeitlin
806317dfcc Really really fix use of wxTranslateFromUnicodeFormat() in the unit test.
Don't build this test at all under Unix, where this function doesn't exist.

(Really really) closes #16118.
2015-04-10 17:01:29 +02:00
Vadim Zeitlin
ffcc18580e Really fix use of wxTranslateFromUnicodeFormat() in the unit test.
Update the function declaration in the test too.

(Really) closes #16118.
2015-04-10 16:24:58 +02:00
Dimitri Schoolwerth
adbc9863b2 Handle quotes in wxTranslateFromUnicodeFormat.
When parsing Unicode date formats text inside single quotes should not be
escaped and instead treated as literal text. In addition two single quotes
(either inside or outside quoted text) should be interpreted as a single
quote.

Fixes #16118.
2015-04-09 04:39:35 +04:00
Vadim Zeitlin
58114f22c3 Detect the use of incompatible flags for wxGridSizer too.
Complain if wxEXPAND is combined with both horizontal and vertical alignment
flags, as this doesn't make sense and, moreover, the behaviour has changed
since the last commit: now wxEXPAND is ignored instead of overriding the
alignment flags if they are combined.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
9aaa38c7c8 Make it possible to combine wxEXPAND and alignment in wxGridSizer.
Allow overriding wxEXPAND effect in one of the directions by specifying
wxALIGN_{RIGHT,BOTTOM} or wxALIGN_CENTRE_{HORIZONTAL,VERTICAL} together with
it (unfortunately this doesn't work for wxALIGN_{LEFT,TOP} as their value is 0
and so their presence in flags can't be detected).
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
7e865daa26 Add unit test for wxFlexGridSizer layout logic.
Currently just test that wxEXPAND flag works as expected.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
78b98bf00c Validate wxBoxSizer flags instead of silently ignoring invalid combinations.
Detect using flags corresponding to the major sizer direction (which doesn't
make sense as only the proportion governs the behaviour in this direction) and
also combinations of alignment flags with wxEXPAND.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
7811394694 Add WX_ASSERT_FAILS_WITH_ASSERT_MESSAGE helper.
This is similar to the existing WX_ASSERT_FAILS_WITH_ASSERT, but allows to
specify the message to give if the expected assertion is not triggered.
2015-04-08 23:35:19 +02:00
Vadim Zeitlin
636d08323f Assert if incompatible sizer flags are used.
We can't check for all the invalid combinations, but at least check for
wxALIGN_CENTER_HORIZONTAL+wxALIGN_RIGHT and wxALIGN_CENTER_VERTICAL+
wxALIGN_BOTTOM which never make sense and can be detected.
2015-04-08 23:35:18 +02:00
Dimitri Schoolwerth
66cfa40643 Deal with remaining cvs/svn keywords.
A few $Id$ references remained after commit
3f66f6a5b3 or appeared in newly added files.
Remove the lines containing svn keywords except when it concerns
third-party files. In that case keep the line as-is or collapse it to the
keyword if it had been expanded to contain wx commit information (only
occurs with src/zlib/ChangeLog).
2015-04-09 03:32:23 +04:00
Vadim Zeitlin
3ee12b2ca9 Convert all XPM files to Unix EOLs.
Just as the normal sources (*.h, *.cpp), these files should be using LF and
not CR LF.
2015-03-19 21:46:05 +01:00
Bryan Petty
164d5dbb37 Sync EOL normalization settings.
This reflects additions to .gitattributes in last commit.

See #15584
2015-03-17 13:47:20 -06:00
Vadim Zeitlin
0a8ea54125 Fix typo in DateTimeTestCase::TestParseRFC822() method name.
No real changes, just s/Parce/Parse/
2015-02-26 00:17:26 +01:00
Vadim Zeitlin
4c90d08f43 Fix the expected size of the header logo on www.wxwidgets.org.
The image has been updated in the website repository and online, update its
expected size to reflect it and fix the unit test suite.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 17:44:57 +00:00
Vadim Zeitlin
51404f8792 Cast size_t value when using it with printf() in a test.
Use %lu with a cast to avoid warnings in both 32 and 64 bit builds.

Closes #16720.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-10 00:14:14 +00:00
Vadim Zeitlin
069415c2a6 Fix wxStringTokenizer copy ctor and assignment operator.
Implement copying of wxStringTokenizer correctly: compiler-generated versions
didn't work as the position of the tokenizer didn't point into the correct
string after making the copy.

Fix this by adjusting the position iterator to use the copy of the string.

Closes #16339.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78050 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-20 15:08:09 +00:00
Vadim Zeitlin
0bb7676889 Disable surrogate-related unit test for MSW.
This test can't work when the in-memory representation is UTF-16, as we can't
convert surrogates to anything else in this case.

This fixes the unit tests broken since r76622, see #16298.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-14 19:36:51 +00:00
Vadim Zeitlin
f99ff49e29 Don't end converting prematurely on encountering consecutive NULs.
Don't stop converting subsequent chunks just because the length of one of them
was 0: this can happen if the first character of a string is a NUL or if there
are two (or more) NULs in it later.

Simply remove the check for this and continue as usual even in this case.

Also add a unit test verifying that we do translate NULs in input into NULs in
output.

Closes #16620.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78021 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-14 19:36:46 +00:00
Vadim Zeitlin
b9e0e606a8 Add support for 'z' size format specifier.
Assume that non-MSVC compilers support it directly and use 'I' for MSVC.

Closes #16596.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-12 20:48:41 +00:00
Vadim Zeitlin
2f51147732 Fix resource compiler include path for Borland.
Explicitly include $(BCCDIR)/include/windows/sdk directory in the resource
compiler options, as it needs it to find windows.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 16:30:00 +00:00
Vadim Zeitlin
adf8f9d0cd Handle multiple item insertion and deletion in wxSelectionStore.
Rename the existing but not implemented and never used OnItemAdd() method to
OnItemsInserted() and add OnItemsDeleted(), which is more efficient than
OnItemDelete() when many items are being removed from the control at once.

This is not used yet, but will be used in wxDataViewCtrl soon and maybe in the
other controls later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:21 +00:00
Vadim Zeitlin
06ab4da3f3 Add wxSelectionStore::IsEmpty() helper.
Just a simple and potentially (although not right now) more efficient
equivalent to GetSelectedCount() == 0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:18 +00:00
Vadim Zeitlin
d058c09e9f Add possibility to iterate over all selected items in wxSelectionStore.
This is necessary for retrieving all the selected items at once: while doing
this is not recommended for a control with a potentially very large number of
items, it must be possible to allow using wxSelectionStore for wxDataViewCtrl
implementation as wxDataViewCtrl must implement its GetSelections() method.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:15 +00:00
Vadim Zeitlin
98c68150ed no changes, add more specific description of these tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:45 +00:00
Vadim Zeitlin
fae6a86a49 This statement that will cause segmentation fault before. Now it ok and enable it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:44:30 +00:00
Vadim Zeitlin
42d5c34c64 x11 alrady support GetUnicodeKey() by last commit, remove these check
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:41 +00:00
Vadim Zeitlin
ad84d9f97d make wxKeyEvent could get unicode key under x11, add a x11 keysym--unicode char map tab
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77846 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:37 +00:00
Vadim Zeitlin
813c7a15c1 add wxYield to make sure all event was executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77837 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:43:06 +00:00
Vadim Zeitlin
f6fdfe8ebc about focused window, replace static variables implementation by DoFindFocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:58 +00:00
Vadim Zeitlin
adf61108be wxX11 return keycode by GetKeyCode directly, not support GetUnicodeKey yet
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:54 +00:00
Vadim Zeitlin
fdbc16ed8d add wxYield() after SetFocus, make sure the all event will be executed.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:51 +00:00
Vadim Zeitlin
e5123cf2f4 disable the unit test under wxUniv too. wxGrid implementation may has bug that work with simulator
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77827 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:36 +00:00
Vadim Zeitlin
31f0808ee2 reenable this tests under wxUniv/x11 port. EventPropagationTestCase::MenuEvent cause the problem, not these. MenuEvent will be fixed later
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77825 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:29 +00:00
Vadim Zeitlin
d9b0c17412 modify the listbasetest.(10,5) is not a correct position in wxUniv/x11 listbase test. (10, 10) could work both on wxUniv/x11 and other ports(already tested)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:15 +00:00
Vadim Zeitlin
fe733e34c2 add maxline restriction in single line mode textCtrl. let textctrl will fire wxEVT_TEXT_MAXLEN and not recive the chars when the text length beyond the maxlength
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:42:12 +00:00
Vadim Zeitlin
ba7835e5c6 add wxYield() to make sure the former event will executed done
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77805 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:21 +00:00
Vadim Zeitlin
9d7a7ec556 after analisys the behaviour of treectrl in GTK and Qt, right arrow should not move down. Expand the current item will be fine
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77803 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:15 +00:00
Vadim Zeitlin
f83756c2e5 after reset the m_current(focused item) in ClearFocusedItem(), the test could pass under wxUniv. Due to wxGTK and wxOSX use it in same way. So remove the check in test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77802 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:12 +00:00
Vadim Zeitlin
bc19f463a2 add wxYield() after SetFocus(), set focus event needs to be processed before the control can accept input
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:41:06 +00:00
Vadim Zeitlin
4363f9b578 These test will cause test_gui segmentation fault, disable for now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:40:15 +00:00
Vadim Zeitlin
c40871e8ce Fix the prepocessor directive, from __WXOSX_COCOA__ to __WXOSX__
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77778 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:50 +00:00
Vadim Zeitlin
2bfd94d59c wxX11 use XColor directly, so wxX11 does not support alpha at all currently
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77775 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:41 +00:00
Vadim Zeitlin
196227619d Adjust comments
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77772 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:28 +00:00
Vadim Zeitlin
7138937cb1 in wxUniv, non-editable textctrl must be set focus, so that could get input value
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77767 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:13 +00:00
Vadim Zeitlin
c24ded647e in wxGTK, wxOSX/Cocoa, plus wxUniv, GetNumberOfLines() always returns the number of logical, not physical, lines. See #12366, maybe they did not test wxUniv at that time.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-23 17:39:08 +00:00
Vadim Zeitlin
c2e18d75e5 Fix wxCALL_FOR_EACH() to work with more than 2 arguments with MSVC.
Due to a bug in MSVC handling of __VA_ARGS__ (see
https://connect.microsoft.com/VisualStudio/feedback/details/380090/variadic-macro-replacement)
wxCALL_FOR_EACH() didn't work correctly as long as more than two arguments
were used with it.

Work around the bug by protecting __VA_ARGS__ from being incorrectly passed as
a single token to the macro being called on every step: this was already done
for wxCALL_FOR_EACH itself with wxCALL_FOR_EACH_, but we need to do it for all
the helper macros too.

Also add a test checking that this does, actually, work.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77689 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-14 00:59:53 +00:00
Vadim Zeitlin
1addaeaa75 Add wxUIActionSimulator::Select().
Add a helper to select an item in a wxChoice, wxComboBox, wxListBox or similar.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-10 16:52:01 +00:00