Commit Graph

56886 Commits

Author SHA1 Message Date
Václav Slavík
5063450e48 Lock m_critsect in POSIX wxThread::Create().
This is the documented behavior: all methods accessing m_internal should
lock it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:15:38 +00:00
Vadim Zeitlin
3942aa77f5 Re-enable wxAny<double>::GetAs<wxString>() test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 11:40:08 +00:00
Jouk Jansen
a60b469fa5 m_useExtendedPrecision is only used if the macro wxUSE_APPLE_IEEE is defined
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 06:18:54 +00:00
Vadim Zeitlin
d949642d76 Enable wxAny<double>::GetAs<unsigned long>() test.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 01:45:42 +00:00
Vadim Zeitlin
3135098707 Re-enable a single m_anyDoubleDouble1 test in wxAny test case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 21:45:28 +00:00
Vadim Zeitlin
9b237f109c Fix wxXmlNode self-assignment.
Don't lose the node contents if it's assigned to itself.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 21:45:25 +00:00
Vadim Zeitlin
52e4cd7308 Reenable m_anyBool1 tests in wxAny test case too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73991 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 20:02:01 +00:00
Vadim Zeitlin
0b3e395a5c Fix memory leak in wxXmlNode::operator=().
We must delete all children and attributes in the node being overwritten and
not just the first one of each.

Add a unit test exercising this code to be able to check that valgrind doesn't
report memory leak any more after the fix.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 20:01:58 +00:00
Vadim Zeitlin
5181927e6b Re-enable conversions of wxAny to boolean tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:53 +00:00
Vadim Zeitlin
2747a51b24 Restore ability to parse hours only with wxDateTime::ParseTime().
This was accidentally removed in r51059, but worked in 2.8 and so should
continue to work.

Also add a unit test to ensure that this doesn't get broken again in the
future.

Closes #15204.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:49 +00:00
Vadim Zeitlin
b561290c3a Fix crash in wxGTK wxPopupWindow when creating it without parent.
Popup windows don't necessarily have a parent, so don't crash if parent
pointer is NULL in wxPopupWindow::Create().

Closes #15173.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73987 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:45 +00:00
Vadim Zeitlin
bed4928779 Allow shrinking the array with wxArray::resize().
This method did nothing if its argument was less than the current array size,
as it was just a synonym for SetSize() which was documented to behave like
this, but this was inconsistent with std::vector and wxVector resize() which
does shrink the array, so change wxArray version to shrink it too.

Closes #15195.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73986 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:40 +00:00
Vadim Zeitlin
7cda2aab67 Fix typo in a closing "#endif" comment in the test.
Closes #15203.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73985 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-15 13:05:36 +00:00
Václav Slavík
a68c185d22 Move wxTransform2D methods' bodies to geometry.cpp.
They are all virtual and so cannot be inlined anyway and having them in
the header like this confuses the g++ linker into always pulling some of
the methods in merely because geometry.h was included.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73984 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-14 16:58:20 +00:00
Vadim Zeitlin
32abcfc2ae Reenable some wxAny tests back.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73982 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-14 11:07:15 +00:00
Vadim Zeitlin
3717eeaf39 Add more echo trace statements to runtests.bat script.
Try to make the output a bit more organized.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-14 11:07:12 +00:00
Vadim Zeitlin
16983807c5 Disable more wxAny tests again.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-13 17:09:20 +00:00
Vadim Zeitlin
dddc2bc23c Try to find another wxAny test that results in heap corruption.
Conversion to float is not the only problem...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-13 13:25:44 +00:00
Vadim Zeitlin
39489697a3 Disable more tests in wxOSX/PPC build.
Also added a #warning to make it more apparent what we're doing here.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-13 11:05:43 +00:00
Vadim Zeitlin
99119b0e85 Whack-a-mole with wxOSX/PPC unit tests continued.
The problem was not related to float-to-double conversions in wxAny code, try
to narrow it even further.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 23:04:13 +00:00
Vadim Zeitlin
dc8cd788c0 Fix harmless Clang warning about unreachable code.
Unfortunately Clang intelligent flow analysis prevents us from using different
asserts for invalid parameter value and unhandled one, which could happen if
more elements are added to wxMouseButton enum in the future.

Closes #15201.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73972 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 23:04:08 +00:00
Vadim Zeitlin
60dbc04c46 Disable double-to-float conversion tests in wxAny code.
This seems to be the reason for the heap corruption in wxOSX PPC builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 20:34:46 +00:00
Vadim Zeitlin
0ad0b6395c Disable the rest of Editable() test for wxBitmapComboBox.
See r73957, this test keeps failing when running on a build slave, even though
it passes when ran locally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 20:34:43 +00:00
Vadim Zeitlin
1cb4d74fb5 Use "-t" option when running buildbot tests under Windows.
Use "-t" in runtests.bar used by Windows build slaves to get more information
about the test failures, notably if they crash before completing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73969 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 20:34:40 +00:00
Vadim Zeitlin
5ec34ab09c Fix spurious g++ warning about possibly uninitialized variable use.
The variables are actually initialized in all cases if the enum has valid
value but the compiler doesn't seem to take this into account, so just
initialize them always to avoid the warnings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73968 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 20:34:37 +00:00
Stefan Csomor
49ee8d1f65 deactivating r65382 see #12267 (which does not seem to happen anymore even without this change), fixes #14938,
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73967 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 20:18:57 +00:00
Vadim Zeitlin
a4c7b5e435 Enable another test in wxAnyTestCase under OS X.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 19:19:46 +00:00
Vadim Zeitlin
92318ee1fd Recognize "sandbox" user as indicating automatic testing.
The buildbot slaves actually use "sandbox" as the user name, not "buildbot",
so test for the former instead for the latter, see r73963.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-12 19:19:43 +00:00
Vadim Zeitlin
1a9961c430 Enable yet more tests in wxAnyTestCase::GetAs().
This is part of the continuing series of commits to find out what results in
heap corruption in wxOSX PPC builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73964 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 19:21:45 +00:00
Vadim Zeitlin
6524d302d0 Recognize "buildbot" user in IsAutomaticTest() too.
Some build slaves apparently run under "buildbot" user and not "buildslave",
recognize them as running automatic tests too.

Also show the name of the current system and user on startup to avoid such
guess work in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73963 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 19:21:42 +00:00
Vadim Zeitlin
862c0963cb Revert "Show the name of the actually tested class in text entry unit tests."
Revert r73959, the name of the control can be seen from the name of the
failing test case actually, so there is no need to include it in the message.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 19:21:38 +00:00
Stefan Csomor
d9307d006e applying editor part of patch, see #15003
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 18:31:51 +00:00
Vadim Zeitlin
94474c2e0b Use wxjpeg_boolean in libtiff sources.
This fixes compilation problem when using libtiff with the built-in modified
version of libjpeg that uses wxjpeg_boolean instead of boolean as it doesn't
define boolean at all in its headers, but just wxjpeg_boolean.

Closes #15179.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73960 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 13:25:29 +00:00
Vadim Zeitlin
16ddd52f06 Show the name of the actually tested class in text entry unit tests.
This test is used for several different classes, show the name of the class
being tested when the assert in Editable() test fails.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 13:22:11 +00:00
Vadim Zeitlin
37dd9a696c Enable a few more tests in wxAnyTestCase::GetAs().
This is part of the continuing series of commits to find out what results in
heap corruption in wxOSX PPC builds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73958 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-10 13:22:08 +00:00
Vadim Zeitlin
5cbb4a59ce Disable a sporadically failing check in wxBitmapComboBox unit test.
This check keeps failing in buildbot builds even though it always passes in
local ones (and sometimes in buildbot ones too). Disable it to allow the
entire test suite to pass.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73957 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-09 23:22:09 +00:00
Vadim Zeitlin
784397563c Reduce the number of wxAny tests ran under wxOSX further.
Something in GetAs() test definitely corrupts memory, but what?

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73956 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-09 23:22:06 +00:00
Vadim Zeitlin
1f0b3a2910 Start bisecting GetAs() wxAny test itself.
This is the test that results in memory corruption in wxOSX PPC builds, try
to find out where exactly does this happen.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73955 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-09 22:29:13 +00:00
Vadim Zeitlin
ea32fa53af Leave only a single wxAny unit test disabled.
It looks like the culprit is GetAs() test, verify it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-09 19:56:47 +00:00
Vadim Zeitlin
4c45335cd2 Another attempt to isolate memory corrupting wxAny test.
We now know it's either As() or GetAs() (or both).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 23:18:12 +00:00
Vadim Zeitlin
506b3c5db4 Continue bisecting tests crash in PPC OS X builds.
Disable more wxAny tests.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73952 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 22:01:02 +00:00
Vadim Zeitlin
656634564b Fix wxRichTextCtrl test compilation.
Work around broken pre-C++98 for loop scoping rules in VC6.

See #15184.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73951 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 22:00:11 +00:00
Vadim Zeitlin
29bdcf09ce Really disable wxAny tests under wxOSX.
Instead of disabling them everywhere but there.

See r73944.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 21:17:00 +00:00
Vadim Zeitlin
54753c3d75 Fix duplicate wxContextMenuEvent generation in wxMSW.
Prevent WM_CONTEXTMENU from being propagated upwards the window parent chain
by DefWindowProc(), we already do it ourselves and not marking the message as
processed could result in multiple calls to the same wxEVT_CONTEXT_MENU
handler if it skipped the event.

See #13683.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:41 +00:00
Vadim Zeitlin
0ba28d4196 Fix wrong wxUSE_ACCEL around wxUSE_HOTKEY-related code in wxMSW.
Closes #15193.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:37 +00:00
Vadim Zeitlin
f7ef20685f Add wxVector<>::const_reverse_iterator.
Provide this type too for compatibility with std::vector<>.

Closes #15192.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-08 11:21:32 +00:00
Robin Dunn
58d1949f8c Call InitializeModules instead of just module->Init(). This is needed so the module will have the proper state and not cause an assert when the modules are cleaned up. Since InitializeModules will skip any that are already initialized it doesn't hurt to call it for modules loaded later.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-07 21:09:31 +00:00
Vadim Zeitlin
10d4023e0d Test for NULL associated frame in doc/view event handling code.
A view might not have any associated frame at all (this is probably a bad idea
but we don't seem to explicitly forbid this).

This should have been part of r73943, see #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73945 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-07 15:56:53 +00:00
Vadim Zeitlin
62b88de2d2 Disable more wxAny tests under OS X to try to find the buildbot crash.
Disabling wxVariantConversions test was not enough to fix the crash happening
in OS X PPC build slave, so disable a few more of them.

Temporarily do it for any wxOSX build, the run-time check for buildbot will be
restored later when I finally manage to find the problematic test(s?).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-07 15:10:53 +00:00
Vadim Zeitlin
82dfe81b28 Fix for event propagation in "single document" doc/view mode.
Ensure that the events still get to wxDocManager even when we are using the
single document mode in which a view can be directly associated with the
parent frame.

Closes #14314.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-07 15:07:28 +00:00