As we expect to get decimal points in the text control when we stream floating
point numbers into it, we must do it in a locale which uses decimal point,
e.g. "C" one. Otherwise the test failed when ran in e.g. French locale.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
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
In wxSOCKET_NOWAIT mode wxSOCKET_WOULDBLOCK is not a real error as it's
expected and should be just discarded. Failing to do this could result in the
following scenario:
1. Try to read a big buffer with wxSOCKET_NOWAIT (setting wxSocket error to
wxSOCKET_WOULDBLOCK).
2. Process small part of it.
3. Read more data from wxSocket -- which now goes to the data containing
already cached data without going to the socket itself and this without
resetting the error.
4. Check wxSocket::Error() which turns out to be (still) true.
And this was exactly what happened in mysteriously failing unit test case
reading wxImage contents from a socket: the failure was difficult to reproduce
because it depended on how much data exactly did we read from the socket in
one go.
Fix this by resetting the error properly and reenable the unit test which was
previously disabled for the build bot, it should pass now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This prevents the test from aborting on Linux distributions which ship with
"fortified" version of gcc, such as recent Ubuntu, Fedora and Gentoo.
Closes#12240.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The last commit used incorrect property name, remove the erroneous property
and set the correct svn:eol-style one.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
VC6 tries to use inaccessible copy ctor of the variable passed to
wxString::Format() for some reason.
Just disable the test for it, it's not worth trying to understand this
compiler, and our code gets tested with other ones anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
MSVC 8 and later disables support for "%n" in printf() by default. And
although it provides a function to re-enable support for it, it doesn't seem
to work for the functions we use.
Just disable the test which results in CRT assert when using this compiler.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The parser used to understand only 'Z' specifier for size_t/ptrdiff_t,
which is non-standard libc5 extension. C99 defines 'z' for this purpose,
so use that. Compatibility with 'Z' is preserved.
Also support Visual C++'s non-standard 'I' modifier with the same
meaning.
Fixes#12192.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64800 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxString::Format() was used even when the first argument didn't contain
any %s, yet a string argument was always passed to it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
fix test cases /usr//bin and /usr///bin: they succeed because wxDir::Exists does not care about redundant path separator (and this holds also for non-Unix platforms);
add some more test case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix FileNameTestCase::TestGetHumanReadable to check the result against expected strings using the correct decimal point for the locale used on the test machine.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64512 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
- wxLog already has a better cppunit test class
- wxLocale test in the console sample didn't work on Windows and wasn't very useful
move some tests from the console sample to CppUnit tests:
- wxPathList => PathListTestCase
- wxModule => ModuleTestCase
remove some tests about removed functions of wxMimeTypesManager
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64511 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Remove wxRegKey tests from console sample: on newer Windows they only work when run with admin privileges; also we can expect wx[Reg]ConfigTestCase to already check a good number of wxRegKey features.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
After the recent changes to the event processing logic, forwarding an event
from one event handler to another one stopped working correctly because the
per-event "process here only" flag prevented it from following the event
handler chain after forwarding. This notably broke keyboard navigation in
wxComboCtrl under MSW in wx itself and probably quite a few of other things in
user code.
Fix this by replacing the boolean flag with a pointer to the handler to which
the processing of this event should be restricted. This allows the full
processing to still take place if an event is forwarded to another handler.
So wxEvent::ShouldProcessHereOnly() is now called ShouldProcessOnlyIn() and
takes a wxEvtHandler parameter.
This made appear a problem in wxScrollHelperEvtHandler code that was hidden by
the bug above: the events were still processed multiple times in it. To fix
this, also add wxEvent::DidntHonourProcessOnlyIn() and take it into account in
the base class code. Did I mention that wxScrollHelperEvtHandler must die?
Add another unit test checking that forwarding works correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a warning for the user when running --list without arguments: not all tests are listed, only those enabled by default (e.g. FTPTestCase doesn't appear there)!
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775