Commit Graph

1576 Commits

Author SHA1 Message Date
Paul Cornett
0b92a2083d Fix setting client data when adding items to a sorted wxListBox, broken in r74317
closes #16290


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76605 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-26 07:30:42 +00:00
Vadim Zeitlin
5de9b53902 Disable another wxStopWatch test case in the build bot builds.
We can't rely on the program waking up quickly enough when running on the
(loaded) buildbot machines, better to skip this test than to have spurious
failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-22 15:13:16 +00:00
Vadim Zeitlin
268b33d8a3 Add simple font tests for the drawing unit test.
Check that DrawText() results in the expected output.

Currently the tests are disabled for non-Windows systems because of the
problem with the reference file paths there.

See #16261.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76556 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:21 +00:00
Vadim Zeitlin
4d8ff19a1a Include renderer version into the platform tag in graphics context tests.
This allows to distinguish the results of the same renderer (e.g. GDI+-based
one) on the different OS versions (because GDI+ produces different results
under XP and Windows 8).

Closes #16260.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:08 +00:00
Vadim Zeitlin
898562f7d3 Make assert message in GraphicsContextDrawingTestCase more informative.
Include the paths of the files that we failed to copy.

See #16260.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76553 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-17 12:29:02 +00:00
Vadim Zeitlin
e9f4d80887 Remove checks for ancient gcc/MinGW versions.
Don't test for wxUSE_NORLANDER_HEADERS, this is always true since many, many
years.

Remove tests for gcc version < 3.3, notably 2.95: the minimal supported gcc
version is 3.4.

Closes #15727.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:35 +00:00
Vadim Zeitlin
8c7d31e615 Remove obsolete MSVC version tests.
Don't compare __VISUALC__ with versions 1200 (VC6) and earlier, such tests are
always true or always false now that we don't support VC6 any more, so just
remove them simplifying the code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76548 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:29 +00:00
Vadim Zeitlin
15f255cebb Remove support for Digital Mars compiler.
This compilers is not being developed any longer since many years, drop
support for it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76547 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:23 +00:00
Vadim Zeitlin
49b8d79c87 Remove (Open)Watcom support.
This compiler is not being developed since several years and almost certainly
can't be used to build the current wxWidgets sources anyhow, so remove all
support for it, including a lot of extremely ugly workarounds for its bugs
with template functions.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 13:01:06 +00:00
Vadim Zeitlin
ba8d58df6c Don't build drawing test plugin in static builds.
Static wxWidgets library can't be used in dynamically loaded plugin, simply
don't build it in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76542 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:53:55 +00:00
Vadim Zeitlin
a7a2978fb1 Remove remaining MSVC6 workspace files.
See #15726.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 10:00:30 +00:00
Vadim Zeitlin
9d3921122f Fix drawing test link in static build.
We must use wx_append template which adds the required GUI libraries when
using static versions of wxWidgets libraries and not wx_append_base.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 09:59:10 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
Most importantly, this allows us to remove all MSLU-related stuff.

Some functions which were previously loaded dynamically can now be just used
directly, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Vadim Zeitlin
f641dfd78c Disable wxSleep() test case for buildbot builds.
This test keeps failing just because the buildbot machine are too heavily
loaded. This is not really an error, so just avoid running this test there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76494 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-10 16:20:13 +00:00
Vadim Zeitlin
86c286354f Enable wxCSConv UTF-7 test under Windows.
Even though it doesn't work with iconv under Unix, we can still enable this
test under Windows.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-27 22:39:31 +00:00
Vadim Zeitlin
56375f60c7 Disable TextCtrlTestCase::LongText() for non-MSW platforms.
At least under GTK SetMaxLength(), tested by this test, can't be used with
multiline text controls at all, so running it fails. Keep the test for MSW
only where SetMaxLength() works with controls of all kinds.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76326 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-13 00:00:37 +00:00
Vadim Zeitlin
72aad0d6ea Use the same wxWeakRef implementation for complete and incomplete classes.
This fixes an ODR violation which could arise if wxWeakRef<T> was seen both
when T was an incomplete (e.g. just forward-defined) class and when it was
complete. As different implementations, with different binary layouts, were
used in these two cases, this resulted in fatal run-time problems.

Fix this by always using the slightly less efficient (because storing an extra
pointer) but simpler and safe "dynamic" wxWeakRef implementation.

Also get rid of checks for the ancient compilers such as VC6 and g++ < 3.3,
they are not supported any longer.

Closes #15884.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-12 00:10:54 +00:00
Vadim Zeitlin
ec7d7f6356 Don't build the drawing test in GUI-less builds.
This test requires GUI parts.

Closes #16145.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-01 22:49:04 +00:00
Stefan Csomor
9354ecbbeb fixing missing wxON_BLOCK_EXIT_OBJ1 error on gtk build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76248 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 19:42:08 +00:00
Stefan Csomor
5fb4d3044a testing whether this helps getting the drawing testsuite to build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76246 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 18:28:05 +00:00
Stefan Csomor
3fa022c8b6 adding log for nonprecomp builds, hopefully fixes test compiles on builbot
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-31 12:58:33 +00:00
Vadim Zeitlin
7f48a077ab Remove more unnecessary headers from drawing test.
Don't include GUI headers in non-GUI code.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 18:01:15 +00:00
Vadim Zeitlin
b9a09f5e87 Fix WX_ASSERT_SAME_AS_FILE() definition in the new drawing test.
This macro should use AreFilesContentsEqual(), not
AreImagesFilesContentsEqual(), used by WX_ASSERT_SAME_AS_IMAGE_FILE().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-19 17:59:32 +00:00
Vadim Zeitlin
3f29a21d3e Don't include apparently unnecessary headers in drawing test.
wx/window.h shouldn't be needed in this non-GUI test.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 20:12:32 +00:00
Vadim Zeitlin
a4568e7c85 Add a new test checking wxGraphicsContext implementation correctness.
This test verifies that the output of wxGraphicsContext on the current system
matches the pregenerated reference output.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76164 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 19:31:21 +00:00
Vadim Zeitlin
399371921f Add font colour support to wxFontPickerCtrl.
Currently this is only really implemented under Windows, just as the colour
support in wxFontDialog, but make the API available under all platforms for
consistency.

Closes #11614.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76160 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-18 17:23:13 +00:00
Vadim Zeitlin
2c64172825 Reset the system last error value before checking it in wxLog test.
Explicitly set the last error indicator to 0 before checking that
wxLogSysError() logs it correctly as it wasn't always set to 0 otherwise.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-12 22:20:50 +00:00
Vadim Zeitlin
b356d1d3c7 Add wxFont::GetBaseFont().
This can be used to "undo" the result of Bold() ,Underlined() or Italic()
methods and returns an unadorned version of the font.

Closes #11815.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-11 20:48:20 +00:00
Vadim Zeitlin
acd8a61bd8 Do run TextStreamTestCase::TestULongLong() test case.
We ran TestLongLong test case twice because of an accidental typo.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76111 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-10 19:05:25 +00:00
Vadim Zeitlin
9151248ee0 Update the URL of the web site images used in the test.
The old images don't exist any more after web site redesign.

Also, the new favicon can't be loaded from an unseekable stream because it
contains multiple icons, so point to the old favicon instead.

Closes #16049.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-06 13:53:14 +00:00
Vadim Zeitlin
e7f2eb8f83 Fix harmless signed/unsigned comparison warning in a test.
Don't compare int with unsigned to avoid warnings that were introduced by the
changes of r75940.

See #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76058 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-02 18:06:47 +00:00
Václav Slavík
316fdcbd6d Fix VarArgTestCase::ArgsValidation() after r76027.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76031 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-28 16:15:39 +00:00
Vadim Zeitlin
e15d5575a7 Don't build wxFileSystemWatcher test if wxUSE_FSWATCHER==0.
Closes #16031.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-27 15:46:25 +00:00
Vadim Zeitlin
41d5ebc86f Fix wxCmdLineParser::Found(name) for options with values.
Calling Found() without providing the second "value" argument started
generating an assert since introduction of the negated options as it reused
FoundSwitch() which can only be used for switches, i.e. options without
values.

Fix this to revert a regression since 2.8 and also add unit tests for the
different Found() overloads.

Closes #15986, #16001.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75943 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:47 +00:00
Vadim Zeitlin
81b62354dc Fix wxTextCtrl contents corruption with long strings in wxMSW.
wxMSW automatically extended wxTextCtrl length limit beyond the tiny standard
32KB when it was exceeded, but part of the text being appended into the
control was lost when doing it.

Fix this by retrying insertion after extending the limit.

Closes #15980.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-20 00:32:34 +00:00
Václav Slavík
f5d12dab44 Fix failing TextFileTestCase::ReadMixedWithFuzzing().
The test failed with 33% probability because it didn't account for
trailing non-newline character.  Fixed and also changed the test to
repeat itself a hundred times, to increase the probability of catching
problems like this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-06 10:15:06 +00:00
Václav Slavík
4cbb78cf7d Add line-endings fuzzing test to TextFileTestCase.
Stress-test wxTextFile's handling of unusual CR,LF characters.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:29:03 +00:00
Václav Slavík
fe6f8254fb TextFileTestCase: test for \r\r\r\n parsing.
While r75387 fixed parsing of \r\r\n, it still didn't handle triple-\r correctly.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:51 +00:00
Václav Slavík
40eed079ec TextFileTestCase: test for correct parsing of empty Mac lines.
(This is failing both with and without r75387.)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-02-05 18:28:46 +00:00
Vadim Zeitlin
d94f3f5aba Fix bug with non-NUL-terminaed inputs in wxMBConvUTF8.
We read beyond the provided maximal length as we didn't update the remaining
length while parsing the remaining bytes of an UTF-8-encoded code point.

Fix this and add a test for it.

Closes #15901.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-29 22:25:14 +00:00
Vadim Zeitlin
5cfbf0dc4d Allow iterating over wxCmdLineParser arguments in order.
This allows the meaning of the options to depend on their order relatively to
the other options which wasn't possible before.

See http://review.bakefile.org/r/557/

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75723 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-28 13:04:55 +00:00
Vadim Zeitlin
f4c9767b49 Try rounding the values when resizing wxImage instead of truncating.
This would seem to make more sense and might also fix the test failures
resulting from tiny differences in arithmetic operations when compiled with
different compilers/under different architectures.

Regenerate the test files and commit (disabled) change to the unit test
allowing to do it again in the future.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75715 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-26 16:24:42 +00:00
Vadim Zeitlin
d14879f2bd Fix benchmarks compilation with WXWIN_COMPATIBILITY_2_8 set to 0.
Include wx/crt.h explicitly to be able to use wxPrintf() and friends.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75569 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-07 21:54:48 +00:00
Vadim Zeitlin
419480cf22 Fix several problems with number formatting in wxNumberFormatter.
We shouldn't add thousands separators nor remove trailing zeros for the
numbers in scientific format.

Also avoid "-0" as output.

See #15625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75560 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-05 21:10:52 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Václav Slavík
e8c5400118 wxTextFile: don't loose data with CRCRLF line endings.
Previously, when reading files with completely nonstandard - but
occurring in the wild thanks to broken Notepad - files with CRCRLF, all
content would be replaced with empty lines.

Fix the code to do what many editors do with such files: treat this as
data line followed by an empty one. This is not ideal, but it is better
than discarding data - and arguably, silently cleaning up the endings
wouldn't be great either (and would add extra complications for what is
an obscure and broken case).

See http://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-16 18:54:42 +00:00
Vadim Zeitlin
747a681f61 Try to use /proc/self instead of /dev/core in the unit test.
/dev/core doesn't seem to exist on the machines running Travis CI builds,
check if /proc/self can work there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75331 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-02 16:50:22 +00:00
Vadim Zeitlin
76845041b7 More version change related changes to the generated files.
Somehow not all files seem to have been regenerated after version.bkl change.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-23 00:34:42 +00:00
Vadim Zeitlin
4de86c0b26 Update version to 3.1.0.
And regenerate everything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-21 13:47:05 +00:00
Vadim Zeitlin
2f67c4ae07 Make windres command used in MinGW build configurable.
This allows to pass extra arguments to windres, which is especially important
when using 64 bit windres for building 32 bit applications as the generated .o
file uses a wrong architecture unless "-F pe-i386" is explicitly specified.

See #15601.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75074 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-26 20:29:57 +00:00
Vadim Zeitlin
b845aa636a Fix reading of files with Mac EOLs in wxTextFile.
The last CR-terminated line wasn't handled correctly.

Fix this now and add unit tests to ensure that it stays fixed.

Closes #15583.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75009 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-15 13:04:23 +00:00
Vadim Zeitlin
910f1a96d2 Add wxOleConvertVariant_ReturnSafeArrays flag for better SAFEARRAY handling.
While we can't change the type of wxVariant to which SAFEARRAYs are converted
by default, it's much more convenient to work with the variant objects of the
correct type, i.e. using wxVariantDataSafeArray, when dealing with SAFEARRAYs,
so add a flag which can be set to tell a wxAutomationObject to behave in this
way.

Closes #14700.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:35 +00:00
Vadim Zeitlin
58a37d1c5a Don't leave dangling comboboxes in the GUI unit test suite.
Sort() and ReadOnly() tests created a new combobox without deleting the old
one, and so these comboboxes were left on the screen for the duration of all
the subsequent tests, subtly breaking them. E.g. this was responsible for
spurious breakages in the event propagation test case because sometimes the
context menu event showed the combobox context menu (why this didn't happen
always is another question...).

It would be great to find some way to ensure that nothing is left after a test
terminates but I'm not sure about how to do this with cppunit. So for now just
manually delete the extraneous comboboxes.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:02 +00:00
Vadim Zeitlin
13a119cca8 Fix wxDataFormat comparison operators for wxDF_HTML under wxMSW.
This format is special as it doesn't have a fixed value and is registered
dynamically instead. So we need to call HtmlFormatFixup(), which checks if the
given custom format is actually wxDF_HTML, before comparing formats to ensure
that the real value assigned to this format compares correctly to the fixed
wxDF_HTML value.

Closes #15280.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:57 +00:00
Vadim Zeitlin
6a51bf145f Work around a failure in TreeCtrlTestCase::SelectionChange() unit test.
We were getting an extra event under MSW if the control was initially
unfocused, so do focus it. This is a work around as the extra event shouldn't
occur but I'm too afraid of changing wxMSW code itself so close to 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74995 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:51 +00:00
Vadim Zeitlin
9d7f0c5f7e Avoid spurious errors when getting wxChoice or wxListBox client data in wxMSW.
Even after the changes of r70415, we could still report an error when the
item client data was set to -1 (== CB_ERR) as checking for GetLastError() was
not enough, we need to also ensure that the last error is reset before trying
to get the client data.

Also apply the same fix to wxListBox and add the tests verifying that this
does work correctly.

Closes #13883.

Also fix wxListBox::GetClientData().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:07:44 +00:00
Vadim Zeitlin
e7bdf0ac8d Change version to 3.0.0.
Keep "RC1" in the version string for now, but otherwise all version numbers
should be updated.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74781 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-11 01:46:08 +00:00
Vadim Zeitlin
17d698cca5 Consistently handle DST start time in wxDateTime::Set().
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.

This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.

Closes #15419.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-08 18:00:58 +00:00
Vadim Zeitlin
66b370d05f Rewrite wxLogXXX() macros to avoid "ambiguous else" warnings.
Use a dummy for loop instead of an if statement to avoid all problems with the
dangling else clauses: both the need for an artificially inversed "if" to make
the code like

	if ( something )
		wxLogError("...");
	else
		something-else;

to work as expected and to avoid warnings given by some versions of g++ and
clang for the code above advising to add explicit braces.

Closes #11829.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 17:41:16 +00:00
Vadim Zeitlin
7980868347 Removed a method using wxColour from non-GUI benchmark code.
No idea how could this work before but the presence of this code in the
non-GUI benchmark project prevented it from building. As it's not used anyhow,
just remove it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-31 17:41:13 +00:00
Vadim Zeitlin
69384772ac Fix wxMenu::GetTitle() before the menu is appended to the menu bar.
The mnemonics conversion was not done correctly when the menu title contained
them but the menu hadn't been appended to the menu bar yet.

Closes #15461.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-30 23:32:37 +00:00
Vadim Zeitlin
b736d59eb5 Don't generate any events from wxSpinCtrl and wxSpinCtrlDouble methods.
After the changes of r53758 wxMSW didn't generate any wxEVT_TEXT events but
this was still the case for the generic version (and hence for
wxSpinCtrlDouble under MSW too) and wasn't documented.

Fix all versions to avoid sending events for programmatic actions, add unit
tests checking this behaviour and document it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74631 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 17:00:00 +00:00
Vadim Zeitlin
36a0190ebd Add test for absence of events from wxSpinCtrlDouble ctor.
Run the same NoEventsInCtor() test as we already had for wxSpinCtrl for
wxSpinCtrlDouble as well.

Unfortunately currently there is no way to reuse the tests between these two
classes, we should refactor these test cases to use a common
SpinCtrlTestCaseBase<T> base class.

See #15375 which fixed the underlying bug.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 16:59:54 +00: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
75f9a95448 Use [DOMRange markupString] to get selection source.
This DOMRange method, previously used in GetSelectedText(), seems to provide
exactly what we need so there doesn't seem to be any reason to use JS to get
the selection text, especially as it didn't even work under OS X 10.8 and
returned an empty string in the unit test.

The unit test still needs adjustment to pass because we don't get back exactly
the same HTML as we used originally, but with more relaxed matching it does
pass now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74541 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:17 +00:00
Vadim Zeitlin
a3b7db8729 No changes, just get rid of some wxT()s in wxString unit test.
They were unnecessary and cluttered the code too much.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-16 14:10:11 +00:00
Vadim Zeitlin
9b1aeb4c93 Disable wxFont::SetStrikethrough() test under wxOSX.
Strike through support is not available in wxFont under this platform, as
documented.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:32:00 +00:00
Vadim Zeitlin
2416cd031b Fix totally broken LocaleSetter class in the test suite.
It was based on a completely erroneous assumption that setlocale() returns the
locale that had been previously active when it actually returns the newly set
locale.

This fixes unit test failures in StringTestCase under OS X, as the locale
wasn't correctly restored by DateTimeTestCase that used this class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74522 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:31:47 +00:00
Vadim Zeitlin
a2ae66251c Fix harmless Clang warning about unused class member in a test.
The m_i field is only used in the currently commented out debugging messages,
suppress a warning about it being unused.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:31:43 +00:00
Vadim Zeitlin
1ed753dc8d Fix harmless Clang warning about an unused function.
GlobalOnAnotherEvent() is not used in normal testing.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74520 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-15 01:31:40 +00:00
Vadim Zeitlin
bd0f3ca697 Rebake all the samples and others makefiles too.
The samples makefiles were not regenerated after the recent Scintilla changes
(see r74425), do it now. There are no real changes for most of them (except
stc sample), but it ensures that rerunning bakefile doesn't change anything.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74497 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-13 02:33:00 +00:00
Vadim Zeitlin
168d1f65c1 Reconcile HAVE_VARIADIC_MACROS and wxHAS_VARIADIC_MACROS definitions.
The main user-visible effect of this change is that giving configure
--disable-vararg-macros argument now really disables the use of variadic
macros whereas it didn't disable them in wx/cpp.h before.

It is, of course, also less confusing to not have two very similar but
different symbols.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74489 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-11 22:40:47 +00:00
Vadim Zeitlin
0646084eb2 Allow retrieving the descent and external leading of empty strings.
This used to work before wxTextMeasure changes so make it work again instead
of optimizing the case of empty string away and not returning anything in the
descent and externalLeading output parameters in this case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 01:28:18 +00:00
Vadim Zeitlin
700256bbdb Correctly restore the originally used C locale in wxLocale dtor.
Save the original locale used before we changed it instead of "restoring" the
same locate that this wxLocale object was using.

Add a unit test to verify that this does work as expected.

Closes #14873.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74426 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 22:48:20 +00:00
Vadim Zeitlin
c80ae45452 Only link with libwxscintilla if using Scintilla is enabled.
Correct the changes of r74408 to avoid using libwxscintilla if we don't build
it at all.

See #13837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74425 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 19:14:59 +00:00
Vadim Zeitlin
2d5efafe74 Disable test for setting the creation time under Unix.
Also document that this doesn't work there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74424 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 19:14:20 +00:00
Vadim Zeitlin
55ab731681 Fix FILETIME <-> wxDateTime conversions while DST is in effect in wxMSW.
The result was (consistently, so the tests still passed) off by an hour when
the program was ran while DST was in effect. Fix this by avoiding the use of
FileTimeToLocalFileTime() and LocalFileTimeToFileTime() and just directly
converting FILETIME values to wxDateTime. Not only this is more correct but
it's also simpler and more efficient as well.

Also add a unit test for wxFileName::SetTimes() too.

Closes #13098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 18:21:10 +00:00
Vadim Zeitlin
a4830bb560 Always add libwxscintilla in monolithic mode.
The library was already present in the makefiles but came before the
monolithic library itself, which broke the linking of the samples when using
GNU ld as the dependent libraries must come after the libraries using them.

Closes #13837.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74408 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 12:41:02 +00:00
Vadim Zeitlin
bed99c2256 Rebake the rest of the files after TOOLKIT change in MSW bakefile.
This should have been part of r74406 but I only rebaked wxWidgets make/project
files themselves and not the samples/utils/demos files in it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 12:32:23 +00:00
Vadim Zeitlin
431b8364e6 Fix test for Windows in the new wxExecute() unit test.
TestOverlappedSyncExecute() doesn't currently pass under Windows and was
supposed to not be executed there but was, in console test, as __WXMSW__ is
not defined in this case, only __WINDOWS__ is (as there is no GUI toolkit in
the console applications).

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74404 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 00:27:50 +00:00
Vadim Zeitlin
12ab6ad3d2 Test handling of events from the toolbar in an MDI parent frame.
These events must be received by the currently active child.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74356 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 22:18:18 +00:00
Vadim Zeitlin
ada25b6e95 Ensure that the MDI child is active in event propagation test.
Call wxMDIChildFrame::Activate() explicitly as the behaviour was different
under MSW (where the activation happened too late for the test) and GTK where
the child did become active because of the hacks in place to ensure it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 22:17:55 +00:00
Vadim Zeitlin
5737bab736 Make AsyncExecLoopExitEnum enum in the wxExecute() test public.
This fixes VC6 build as the nested class couldn't access a private enum inside
the enclosing class.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74354 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 11:03:09 +00:00
Vadim Zeitlin
d6655d446d Run wxExecute() unit test in the GUI test suite too.
The same code works differently in console and GUI applications, so build this
test case as part of both of them.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74351 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:40 +00:00
Vadim Zeitlin
821d856a61 Rewrite wxExecute() implementation under Unix.
This commit changes wxExecute() to handle SIGCHLD to be notified about the
child process termination instead of detecting when the file descriptor
corresponding to the other end of a pipe opened in the parent process was
closed in the child as this was not reliable and could (and did) result in not
detecting the termination of the child processes that closed all their file
descriptors before exiting.

This commit also removes a lot of platform-specific code duplicating the
generic event loop sources support and reuses it for wxExecute() purposes too.

Final big change is that wxEndProcessData was merged into wxExecuteData and we
don't have two similar but quite different classes any more but just one,
which is used both to pass the information from wxExecute() to wxAppTraits
methods and to store this information until the child termination.

Closes #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74350 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:32:16 +00:00
Vadim Zeitlin
d3ad22bdb3 Add wxEventLoop::ScheduleExit().
This method allows to request exiting from the given event loop even if it's
not the currently active one, unlike Exit() which would assert in this case.
With it, it becomes possible to ask the loop to terminate as soon as possible
even if a nested loop is currently running.

See #10258.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:26:13 +00:00
Vadim Zeitlin
e77dc839af Use normal event loop in GUI test program.
Don't create an event loop manually, let the port-specific code do it and run
it as usual in the GUI unit tests.

This has several advantages:
 - No need to manage the event loop manually in the test.
 - No need for Mac-specific code in the test itself.
 - Code being tested runs in the same context as in a normal GUI program,
   which is especially important for event-loop related tests under wxOSX as
   the main event loop is special there.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-03 00:25:46 +00:00
Vadim Zeitlin
dbd5b2ce42 Better fix for duplicate wxContextMenuEvent generation under MSW.
Fix the bug with multiple wxContextMenuEvent being generated for a single
WM_CONTEXTMENU without breaking context menus for wxTextCtrl (and all the
other native controls). Do this by ensuring that WM_CONTEXTMENU is still
passed to DefWindowProc() if we don't process it instead of just being eaten
completely in any case.

Also add a unit test checking for this bug to ensure it stays fixed.

See #13683.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-02 20:24:22 +00:00
Vadim Zeitlin
544ab85e05 Add wxImage::Scale() benchmarks.
Measure the time taken to rescale the image to a bigger or smaller size using
normal or high quality.

See #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:48:01 +00:00
Vadim Zeitlin
7b363ab621 Add benchmarks for wxImage methods.
Build a GUI version of the benchmark program too and use it to benchmark
wxImage loading methods for now (more will be added later).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:47:38 +00:00
Vadim Zeitlin
d9a4a0d022 Add a unit test for wxImage::Scale() method.
Check that resizing the test horse image produces the same results in the
future as it does now, by saving the current results in files and verifying
that images resized directly and loaded from these files are the same.

See #15281.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-01 14:47:12 +00:00
Vadim Zeitlin
4f9ccec517 Add wxBookCtrlBase::DoSetSelectionAfterRemoval() and use it in wxSimplebook.
This fixes the wrong handling of the selection in wxSimplebook when the
currently selected page was deleted.

Also extend the unit tests to check for this bug.

Closes #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:39 +00:00
Vadim Zeitlin
6f71e06242 No real changes, just simplify wxBookCtrlBase unit test a little.
Add Realize() virtual function that can be overridden in ToolbookTestCase
instead of using explicit wxDynamicCasts.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:39:15 +00:00
Vadim Zeitlin
10e6908dd3 Add a minimal unit test for wxSimplebook.
This is just a test running the common wxBookCtrlBase tests for wxSimplebook.

See #15188.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-23 16:38:51 +00:00
Stefan Csomor
18c8b0ee1d reusing existing API
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74235 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 14:06:02 +00:00
Vadim Zeitlin
2e1e56d0ce Check wxListCtrl::GetItemRect() origin in the unit tests.
Verify that the top item is _not_ at (0, 0) when the header is present in the
control, as the control client coordinates should not take the header into
account.

This test passes when using wxGenericListCtrl since r74197, add it to ensure
that it doesn't get broken again later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 13:57:51 +00:00
Stefan Csomor
234e255639 wait for the frame window to be really done on OSX before starting
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74195 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 00:15:59 +00:00
Stefan Csomor
3ac6cf59fa using Destroy, as otherwise the remnants get into the way for some other tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74194 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 00:11:18 +00:00
Stefan Csomor
e1004654ab adding exceptions for OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74193 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-13 00:08:27 +00:00
Stefan Csomor
64fd19dbac osx needs a refocus
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 21:30:38 +00:00
Stefan Csomor
809f6ef394 now working on cocoa as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-12 05:46:54 +00:00
Stefan Csomor
79c29706e3 disable tests depending on a focusable slider control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 22:33:00 +00:00
Stefan Csomor
e72e0814b6 draghino explicitly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 22:27:48 +00:00
Stefan Csomor
689c6ca6ef moving click point sightly more inside, #ifndef tests failing with the generic implementation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74168 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 22:21:30 +00:00
Stefan Csomor
9150fa99d4 fixing typo
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74167 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 22:19:21 +00:00
Stefan Csomor
c9fbfcd9f1 fixing include styles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74166 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-11 22:18:33 +00:00
Vadim Zeitlin
0a6ec346d5 Reset row and columns count in wxRichTextTable::ClearTable().
No real changes, just update the internal variables in ClearTable() to avoid
inconsistent internal state, even if this doesn't seem to result in any
problems for now.

Closes #15190.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74057 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-26 13:14:48 +00:00
Vadim Zeitlin
622bc15f11 Add conversions to/from long long to wxUniChar.
Allow conversions to/from long long and unsigned long long values in wxUniChar
for consistency with the other integral types.

Also make the code shorter by using helper wxDO_FOR_INT_TYPES() and
wxDO_FOR_CHAR_INT_TYPES() macros to avoid duplicating the same code for all of
the integral types and having to handle wchar_t (and wxLongLong_t now)
specially because sometimes we may need to overload on it and sometimes not.

Finally, add more tests to check that all the wxUniChar methods compile and
work with all the different types.

Closes #15206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:12 +00:00
Vadim Zeitlin
15df2e476b Disable menu event test case in wxGTK buildbot slaves.
This test sporadically fails for unknown reason and I don't know what to do
about it, so disable it for now to let the test suite pass consistently and be
notifed about any new failures.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-19 12:38:09 +00:00
Vadim Zeitlin
43c42c18d3 Test using wxString::ToCDouble() in wxAny.
Apparently the heap corruption problems in wxOSX/PPC build are due to using
wxString::ToDouble() and not anything done specifically in wxAny at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74019 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 20:00:10 +00:00
Vadim Zeitlin
1422312707 Try using wxString::ToCDouble() instead of ToDouble() in wxAny case.
Apparently enabling the call to ToDouble() in the test is enough to corrupt
the heap in wxOSX PPC build. No idea how can this be possible but try to check
if using ToCDouble() helps...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-17 11:53:46 +00:00
Vadim Zeitlin
79be3fb48d Re-enable yet another hopefully harmless test in wxAny test case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-16 14:32:50 +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
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
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
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
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
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
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
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
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
bc4185a458 Disable wxAny-to-wxVariant conversion test case under OS X.
This is a blind attempt to fix the test crash under PPC OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73942 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 21:46:55 +00:00
Julian Smart
31be840031 Applied patches for #15184 (wxRichTextAction fix for when the command identifier is wxRICHTEXT_CHANGE_OBJECT) and #15185 (Make adding/deleting wxRichTextTable rows and columns undoable)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 13:39:01 +00:00
Vadim Zeitlin
789ab84044 Add IEEE 754 single/double precision support to wxDataStream classes.
Allow to optionally raed/write float/double values in IEEE 754 single/double
precision formats, respectively, instead of always using the extended
precision format for both of them.

This makes the code more flexible, allowing for better interoperability with
the other programs, and also allows to implement floating point functions in
these classes even when wxUSE_APPLE_IEEE is turned off (as can be the case
because of the licencing concerns for the code in extended.c).

Closes #10625.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73938 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-05-06 00:31:03 +00:00