Commit Graph

971 Commits

Author SHA1 Message Date
Vadim Zeitlin
758f356c53 Fix bug with parsing concatenated switches in wxCmdLineParser.
The constructs such as "-abcd" were not parsed correctly, i.e. the same as "-a
-b -c -d" because the code tried to parse a non-existent option "abcd" even if
it was supposed to not do this -- fix this.

Closes #11180.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-07 23:00:05 +00:00
Vadim Zeitlin
2e51fb3041 Correct wxImage::Size() again; add unit tests for it.
wxImage::Size() didn't handle the paste position correctly.

Closes #7874.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 21:43:11 +00:00
Vadim Zeitlin
791f7574a0 Fix buffer overflow in wxURLDataObject.
The code in CFSTR_SHELLURLDataObject::GetDataHere() was confused by
ANSI/Unicode and ended up overwriting output buffer because of it. Moreover,
this function was actually completely unnecessary as the base class version
did work correctly.

Closes #11102 (thanks to Tim Kosse).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:42 +00:00
Vadim Zeitlin
69d31e3130 Output the extracted number from wxString::ToXXX() even if it returns false.
After the changes in r50710 wxString numeric conversion functions didn't
update their output parameter any more if the conversion failed because not
entire string was converted. This was incompatible with the old behaviour
which some existing code did rely on, so restore it and now always return the
number which was extracted from the beginning of the string if we found
anything at all, even if the function returns false.

Add unit test for the correct behaviour and updated the documentation.

Closes #11126.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61786 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-30 17:25:19 +00:00
Vadim Zeitlin
a6cf6bcfb4 Don't append text following CDATA section to its node itself.
Reset wxXmlParsingContext::lastAsText flag when CDATA section ends to avoid
appending the text following it to its node. Instead new text nodes should be
created for it.

Also update the unit test to not work around the bug any more.

Closes #10552.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-24 21:42:27 +00:00
Vadim Zeitlin
07890fbeb5 Never overflow the output buffer in wxBase64Decode().
Don't write extra NUL bytes obtained by decoding the padding at the end of
input into the output buffer as there may be not enough place in it for them.
And in any case the buffer is not (always) NUL-terminated as no NUL bytes are
obtained in absence of padding, so it's better to never terminate it for
consistency.

Closes #11101.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-23 22:25:12 +00:00
Vadim Zeitlin
f9136b63ee Include wx/filefn.h to fix PCH-less compilation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 11:44:31 +00:00
Vadim Zeitlin
b804f9924d Fix last error display in wxLogSysError().
After recent changes of wxLogXXX() functions into macros the last error was
overwritten by wxString::Format() called between the call to wxLogSysError()
and wxLog::CallDoLogNow() which called wxSysErrorCode() and so its original
value was lost and, unless the last error was specified explicitly, it always
came out as 0.

To fix this, call wxSysErrorCode() directly when calling wxLogSysError(). This
may be unnecessary (if the error is given explicitly) but there doesn't seem
to be any other way to fix it and the overhead of calling wxSysErrorCode()
shouldn't be that big.

Also add a unit test checking that wxLogSysError() behaves as expected.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61692 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-08-18 01:22:48 +00:00
Vadim Zeitlin
9a83f86094 Globally replace _T() with wxT().
Standardize on using a single macro across all wxWidgets sources and solve the name clash with Sun CC standard headers (see #10660).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 20:30:22 +00:00
Vadim Zeitlin
89d62794e4 Implement wxVLogTrace() accidentally removed by recent changes.
Also change the unit test to test wxVLogTrace() as well as wxLogTrace.

Closes #11011.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61505 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-23 13:40:44 +00:00
Vadim Zeitlin
52256b21b9 Added ParseFormat("%s") tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-22 16:41:52 +00:00
Vadim Zeitlin
2388960a08 added a test for white space after CDATA (see #10552)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61487 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-21 11:26:01 +00:00
Vadim Zeitlin
43b2d5e7c3 Put braces around all calls to wxLogFunctions() inside an if statement.
This suppresses all the remaining g++ -Wparentheses warnings and uses consistent style everywhere.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61475 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-20 16:47:54 +00:00
Vadim Zeitlin
dbe0872fc8 Added wxVector::swap().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61415 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-12 17:00:29 +00:00
Vadim Zeitlin
c602c59b6e Add component-level filtering to wxLog.
Each log message is now associated with its component, "wx" by default for
messages generated by wxWidgets and wxLOG_COMPONENT in general (which is empty
by default). Each component may have its own log level and they are
hierarchical allowing fine configuration of what exactly is logged.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61414 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-12 14:56:23 +00:00
Vadim Zeitlin
4855770182 disable MSVC deprecation warnings as we intentionally test deprecated methods in this test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-09 12:22:37 +00:00
Vadim Zeitlin
bc73d5aec8 Changed wxLog DoLogXXX() callbacks and introduced wxLogRecordInfo.
The main logging callback is now DoLogRecord() with DoLogTextAtLevel() and
DoLogText() provided for convenience. The old DoLog() and DoLogString() are
still called but deprecated and their overloads taking wxString which were
only added in 2.9.0 are removed.

wxLogRecordInfo allows associating more information than just the time stamp
with the log record; for now only the logging thread id was added but more
fields will make their appearance soon.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61346 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-08 13:47:33 +00:00
Vadim Zeitlin
ece5e6a47a added a simple wxLog unit test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61343 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-07 12:19:34 +00:00
Vadim Zeitlin
60c4147a07 add more tests for wxFileName::Normalize(DOTS) (see #10960)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-03 22:07:22 +00:00
Vadim Zeitlin
be5be16a23 interpret ~ specially only when it is the first character of the path (closes #10948, see #10941)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61271 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-01 09:07:38 +00:00
Vadim Zeitlin
9630954d5d remove _T()s and wxChars from the test making it much more readable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-01 09:02:30 +00:00
Kevin Ollivier
2fc9c1ea77 Forward port wxGraphicsBitmap cairo implementation, and fix the credit info in measuring.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-20 23:33:55 +00:00
Michael Wetherell
9f7191dbb9 fn.Mkdir now gives an ICE on VC6 now that it is const.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-17 17:31:53 +00:00
Vadim Zeitlin
845e4f9b32 disable a VC6 warning occurring inside a standard header
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-07 12:41:52 +00:00
Vadim Zeitlin
a8f1775855 disable MSVC 8+ warning about using Unicode characters as we do want to use them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60931 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:24:57 +00:00
Vadim Zeitlin
de83091077 disable warnings about unused parameters in CppUnit headers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:22:37 +00:00
Vadim Zeitlin
b4d47ca02c use _isatty/_fdopen/_fileno() instead of isatty/fdopen/fileno() with VC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:20:12 +00:00
Vadim Zeitlin
d4b1783215 use _fileno() instead of fileno() with VC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60928 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:18:52 +00:00
Vadim Zeitlin
50a73bb104 use _unlink() instead of unlink() with VC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:17:34 +00:00
Vadim Zeitlin
895cae46b7 work around (harmless) warnings in VC7 release build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60922 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 23:04:50 +00:00
Vadim Zeitlin
756c98b02e fix bug in generic wxTreeCtrl: calling SelectItem(true) on an already selected item shouldn't toggle its selection (see #10830)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-06 14:15:06 +00:00
Francesco Montorsi
23790a2a29 add wxGetLinuxDistributionInfo() and wxPlatformInfo::GetLinuxDistribution() functions; also add to wxPlatformInfo the GetOperatingSystemDescription(), GetDesktopEnvironment(), GetOperatingSystemDirectory() functions to group in the same class (wxPlatformInfo) all available platform-detection functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60873 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-02 13:01:41 +00:00
Francesco Montorsi
5b105c6ff3 use a smaller timeout value to avoid blocking buildslaves for 10minutes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60860 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 14:55:22 +00:00
Francesco Montorsi
9e91447ca4 minor change: differentiate the initial banner of test.exe from test_gui.exe
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60859 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 14:46:44 +00:00
Francesco Montorsi
c99214eb52 add check about network connectivity; don't run the test if it's not available
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 14:45:26 +00:00
Francesco Montorsi
53c2cdb0b1 fix PCH-less build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 12:40:50 +00:00
Francesco Montorsi
21fe35aff7 add wxImage test units to test loading from both seekable and non-seekable streams
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60853 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 11:46:36 +00:00
Francesco Montorsi
1f51673bb8 add wxURL::GetInputStream test unit; add a global IsNetworkAvailable() utility to the test units
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60851 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-01 11:30:50 +00:00
Francesco Montorsi
7b4138e284 refactor printf benchmarks to fit the new wxWidgets benchmarking framework; fix tests and benchmarks builds (at least on linux) which were failing because of wrong order of <wx-lib> tags in the bakefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-30 13:54:22 +00:00
Vadim Zeitlin
787de19a13 update CRT environment block in wxSetEnv() too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60728 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-24 15:33:33 +00:00
Vadim Zeitlin
541aafe2fa disable a test failing under wxGTK because of what appears to be a Pango limitation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-17 14:12:28 +00:00
Vadim Zeitlin
3f7c8a8762 use a different known good face name under non-MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60676 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-17 14:01:38 +00:00
Vadim Zeitlin
a15239a6fd correct test failures under MSW, it shouldn't assume that all predefined fonts have non-empty facenames
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-17 11:52:26 +00:00
Vadim Zeitlin
c56fc0dc30 correct test failures under MSW, it shouldn't assume that all predefined fonts have non-empty facenames; also simplified it by separating different tests in different functions
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60674 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-17 11:51:09 +00:00
Vadim Zeitlin
09be33645a fix errors in EvtHandlerTestCase::BindFunctor() in optimized build: apparently compiler is smart enough to detect that the same object can be used for all temporaries
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60670 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-17 10:56:14 +00:00
Vadim Zeitlin
dd172e7f12 add MSVC project files to svn for consistency
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60598 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-12 10:11:42 +00:00
Vadim Zeitlin
ab5c51e5b2 don't update stc.h when not building the library, it doesn't make sense to do this in the samples makefiles
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60596 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-12 09:13:36 +00:00
Vadim Zeitlin
4e42fe49f2 removed the now unnecessary WX_CPPUNIT_ALLOW_EQUALS_TO_INT(wxFileOffset)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60503 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-03 11:36:04 +00:00
Vadim Zeitlin
61b1a51bde allow comparison of int with 64 bit integer type (see #10637)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-03 09:59:31 +00:00
Vadim Zeitlin
97818dab10 std::streamoff is just a (32 bit) long under Win32 with MSVC so extra WX_CPPUNIT_ALLOW_EQUALS_TO_INT(std::streamoff) is not needed in this case; this also seems to be the case for Borland and Watcom so assume this is always so for Windows compilers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-03 07:52:49 +00:00
Vadim Zeitlin
72a7c55982 added wxStd{In,Out}putStream classes (closes #10637)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60483 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-02 18:29:33 +00:00
Vadim Zeitlin
ca6911c361 allow passing temporary functors to Bind() too (closes #10653)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-02 15:28:16 +00:00
Vadim Zeitlin
890d70ebea improvements to wxEventFunctor classes; use wxHAS_EVENT_BIND instead of wxEVENTS_COMPATIBILITY_2_8 (see #10653)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60470 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-02 12:52:54 +00:00
Kevin Ollivier
23513e07f5 Rebake after latest changes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60371 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-26 02:04:16 +00:00
Chris Elliott
95ff11c4bb update bakefile to 0.2.6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-24 10:36:24 +00:00
Vadim Zeitlin
b7923f2ac1 add test checking that switching mode doesn't change the controls contents (see #9484)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-21 17:19:08 +00:00
Vadim Zeitlin
15cb637c96 use CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT whenever possible to see more information about the test failures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60233 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-18 12:19:38 +00:00
Vadim Zeitlin
042908a1ac use "ul" suffix instead of cast to unsigned long; this is not only shorter but also avoids gcc warning about working correctly only in C90
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60216 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-17 13:06:27 +00:00
Vadim Zeitlin
48c56e04b0 added failing compilation test for the case of missing handler in Bind() call
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 21:33:37 +00:00
Vadim Zeitlin
b3710b1030 rebake after the addition of graphics/measuring.cpp
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60201 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 14:49:28 +00:00
Vadim Zeitlin
449cb073c0 added a failtest target to Makefile to test for the (expected) compilation failures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60200 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 14:47:22 +00:00
Kevin Ollivier
f806b2b4ee Add a test to ensure that CreateMeasuringContext creates a valid context
that can measure text.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60187 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-15 22:38:53 +00:00
Stefan Csomor
8b7b1a5748 guaranteeing autorelease pools for overridden OnRun on OSX
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 19:54:01 +00:00
Francesco Montorsi
aeecbca059 dump all font properties upon failure
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 18:55:41 +00:00
Vadim Zeitlin
d911dc04ae only run tests using multiline strings with multiline text control; document that using multiline strings doesn't work with singleline controls
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60138 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-14 13:22:09 +00:00
Francesco Montorsi
6aafb94526 even more detailed info to debug buildslaves failures
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-13 18:34:27 +00:00
Vadim Zeitlin
561ff470ca suppress output from the test commands; use CPPUNIT_ASSERT_EQUAL() whenever possible
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60124 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-13 17:33:33 +00:00
Francesco Montorsi
9b5e0a6dea provide more info when a check for native font [user] info fails
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-13 09:03:45 +00:00
Vadim Zeitlin
75ac34cefc fix support for using asterisks in the format string and some code cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-12 23:37:28 +00:00
Francesco Montorsi
6aea1e4a70 implement wxNativeFontInfo::SetFamily for wxGTK with the same logic used by wxMSW; remove the now useless m_family from wxGTK's wxFont implementation; better docs for many wxFont functions (don't use typeface term; use the 'face name' one instead) and wxFontFamily
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60119 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-12 22:53:26 +00:00
Vadim Zeitlin
390b8241d3 revert r60023 and really fixed compilation problems caused by r60017 by providing assertEquals(const char *, const char *) overload as well
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60024 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 23:55:05 +00:00
Vadim Zeitlin
0eb83a1a72 compilation fix after r60017
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 22:33:20 +00:00
Michael Wetherell
cc90c1cc3e Fixes for archive tests on Windows.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 22:12:04 +00:00
Vadim Zeitlin
245ff47f7c fix the test for !wxUSE_UNICODE_UTF8 builds: don't suppose that strings are UTF-8 encoded in VsnprintfTestCase::S() but use FromUTF8() explicitly (how did it manage to work with VC9 before?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60018 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 16:45:23 +00:00
Vadim Zeitlin
3879212eee fix VsnprintfTestCase::P() for mingw32 which may use MSVC CRT (closes #10679)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 16:02:23 +00:00
Vadim Zeitlin
df6de630f5 fix test failure on glibc systems which do not use %T; also replace CompareTimeFormats() with a macro to get failure messages on the right line
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 12:09:54 +00:00
Vadim Zeitlin
84d8eabd81 no changes, just fixed typo in an error message
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60010 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-04 11:49:30 +00:00
Stefan Csomor
db227bf893 adjusting DATE_TIME_FMT on OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 18:05:57 +00:00
Vadim Zeitlin
727e8d842f fix the test case which wrongly relied on wxString using UTF-8 representation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60004 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 17:03:16 +00:00
Vadim Zeitlin
27dd021da3 fix the test case which wrongly relied on wxString using UTF-8 representation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60003 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 17:02:12 +00:00
Vadim Zeitlin
e992b97f1b avoid the ugly hack with adding an empty string to m_registries to indicate that we need to run all tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60000 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 16:38:20 +00:00
Vadim Zeitlin
ad16130f66 add possibility to choose the locale (useful for Windows which doesn't honour LC_ALL &c)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59997 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 15:31:57 +00:00
Vadim Zeitlin
fac0939500 use correct expected values for Windows and OS X
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-03 15:23:26 +00:00
Vadim Zeitlin
525711d7a3 don't run wxPATH_NORM_LONG test on systems where the short file names are disabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59974 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-01 21:49:47 +00:00
Vadim Zeitlin
27aec6b6fc expect 4 digit year in French locale under all platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-01 21:17:35 +00:00
Vadim Zeitlin
d8a696fb5f correct French short date format for glibc; added more detailed messages for failing tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-30 22:23:05 +00:00
Vadim Zeitlin
d73a520945 allow running tests whose names don't end with TestCase again
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59953 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-30 22:18:24 +00:00
Vadim Zeitlin
b9d2203419 only Linux/glibc seem to use periods as date separator in French locale
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59949 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-30 21:14:09 +00:00
Vadim Zeitlin
89a7e1ff98 Added wxLOCALE_DATE/TIME_FMT support to wxLocale::GetInfo().
- Implement for POSIX and Win32, TODO for OS X
- Use this instead of ad hoc code in wxDateTime::ParseFormat()
- Remove HAVE_STRPTIME, we don't need nor use strptime() any more


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59914 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-29 17:15:43 +00:00
Václav Slavík
de4983f323 split wxCharTypeBuffer<T> into wxScopedCharTypeBuffer<T> and wxCharTypeBuffer<T> -- the former is for transient data with validity limited to parent's lifetime, the latter is for permanent storage of string data (bug #9638)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59887 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-27 15:33:55 +00:00
Vadim Zeitlin
07c4e84f7b always declare TestStrip(), it is now available even without 2.8 compatibility
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59879 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 23:00:14 +00:00
Vadim Zeitlin
181dd701fa implement deprecated wxStripExtension() in terms of new wxFileName::StripExtension() (closes #10634)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 15:55:01 +00:00
Vadim Zeitlin
62714742f3 no changes, just some cleanup (use compile-time asserts instead of run-time ones; use "FAIL" instead of "F")
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 15:35:30 +00:00
Vadim Zeitlin
875f82b1b6 switch off logging sooner (closes #10646)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 15:31:54 +00:00
Vadim Zeitlin
2057acc2a7 build bot systems don't manage to generate enough ticks in 2 seconds to pass this test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 14:58:22 +00:00
Vadim Zeitlin
92f8206fee remove unused variable
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-26 13:46:22 +00:00
Vadim Zeitlin
29e0c68ef5 produce a better looking report with --time option (closes #10643)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59856 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 16:28:20 +00:00
Vadim Zeitlin
955e1ce861 ensure the number of values we expect to record in RecordingDefaultsTest() is always correct (fixes test failure under VC6)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59852 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 13:43:31 +00:00
Vadim Zeitlin
5c8640d093 correct order of parameters in CPPUNIT_ASSERT_EQUAL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 13:40:22 +00:00
Vadim Zeitlin
174649c955 fix tests for the release builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59848 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 13:32:53 +00:00
Vadim Zeitlin
9912799caf don't log std::exceptions ourselves, let cppunit do it as it outputs more details
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 13:32:19 +00:00
Vadim Zeitlin
2e6c4a5702 give more detailed message when the test fails in TestTimeFormat()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59844 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 12:59:19 +00:00
Francesco Montorsi
14a83cbf36 fix the FontTestCase::GetSet unit so that it passes under wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 12:49:04 +00:00
Vadim Zeitlin
b33e98f0bd trap CRT assertions and report assertions which happen inside CppUnit tests in a better way
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59838 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 10:42:11 +00:00
Francesco Montorsi
8057186b81 PCH less build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59823 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 00:25:37 +00:00
Francesco Montorsi
e3527f7bc5 make sure that wxSystemSettings::GetFont/GetColour return values are always valid
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 23:13:02 +00:00
Vadim Zeitlin
e538985edc added GetEnglish{Month,WeekDay}Name()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 16:51:10 +00:00
Vadim Zeitlin
dc310ea07f discard the time zone part of strings being parsed (generalizes the "CEST"-ignoring hack of r59682)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59809 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 12:19:21 +00:00
Vadim Zeitlin
66f22f4ae5 fix parsing methods for non-ASCII strings (e.g. dates in non-"C" locales) (see #9560)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 00:11:42 +00:00
Vadim Zeitlin
34d4d2864c enforce "C" locale for tests which can't work in any other (because test data is in English)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59797 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 23:29:10 +00:00
Vadim Zeitlin
3aa3163f66 give better error messages when tests fail
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 23:22:37 +00:00
Francesco Montorsi
3162be2bd9 small changes to make the test run fine on wxMSW, too;
do not use stdout as variable name as VC9 doesn't like it

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 16:49:20 +00:00
Francesco Montorsi
16f7158098 put wxSetLocale() call in setUp() as VC6 still fails because of wrong locale in VsnprintfTestCase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 16:25:44 +00:00
Francesco Montorsi
ca5016d4dd make sure that wxProcess always have a valid PID set; add test unit for wxExecute,wxShell,wxProcess based on the code in the console sample; add some more infos/notes in wxProcess docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59784 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 16:23:44 +00:00
Francesco Montorsi
7749be1236 adds proper detection of tests success/failure; clear that "error level" != "return code"
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 14:57:10 +00:00
Vadim Zeitlin
ffdb0ee5ab initialize NUM_COLS correctly in columns order test (closes #10630)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59766 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 12:18:51 +00:00
Francesco Montorsi
12e91a550c fix typo; use C locale for VsnprintfTestCase
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59765 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 12:17:39 +00:00
Francesco Montorsi
2026b433b9 this one should really work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59762 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 11:01:33 +00:00
Francesco Montorsi
78f2eafcb6 fix the build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 10:58:32 +00:00
Francesco Montorsi
f70cea2bdc blind carbon build fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 10:04:56 +00:00
Francesco Montorsi
8405285c69 try to remove /B from EXIT commands; prints a "separator" between test.exe and test_gui.exe output
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59757 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-23 10:01:13 +00:00
Francesco Montorsi
a17023d376 fix building tests in release mode
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 23:02:55 +00:00
Vadim Zeitlin
5c5e59f8c3 correct syntax (patterns need to be escaped)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 22:08:19 +00:00
Vadim Zeitlin
031b101f09 moved the check for correct implementation of wxEvent::Clone() to a unit test from wx startup code
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 21:31:34 +00:00
Vadim Zeitlin
ddaf7a11c3 set the PATH to contain ../lib/*_dll directories before running the tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 21:07:51 +00:00
Vadim Zeitlin
cc14bd0058 added wxStaticCast() unit test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 21:04:28 +00:00
Vadim Zeitlin
6582f59207 compilation fix for wxUSE_STD_STRING==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-22 16:10:09 +00:00
Vadim Zeitlin
657a8a3598 first round of debug/release merge: introduce wxDEBUG_LEVEL, for now defined as 1 if __WXDEBUG__ is defined, i.e. no real changes; don't use __WXDEBUG__ in the headers to keep debug and release builds ABI-compatible; add functions to customize or disable asserts handling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59711 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 23:36:37 +00:00
Francesco Montorsi
92de7654e9 use /b option with the EXIT command
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59695 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 13:49:20 +00:00
Francesco Montorsi
1789c1c602 fix for PCH-less builds
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 12:34:18 +00:00
Francesco Montorsi
1dd8319ab9 revert 59680; implement proper fix for wxMSW test failure detection
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59693 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 12:28:52 +00:00
Francesco Montorsi
a6121fc4e0 fixes for Italian locale: ignore a final 'CET' string and don't test '%p' for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 00:37:19 +00:00
Francesco Montorsi
d24a0a3a30 try to use 0/1 instead of the cstdlib' EXIT_SUCCESS/FAILURE constants to see if buildbot makes red the currently-green boxes relative to wxMSW test runs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 00:16:43 +00:00
Francesco Montorsi
6d423df049 allow to give the testcase name without the final 'TestCase' postfix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59679 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-21 00:06:32 +00:00
Francesco Montorsi
529e491ce0 add the ToCLong, ToCULong and ToCDouble functions, with docs and test units
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-20 14:50:06 +00:00
Francesco Montorsi
fdfc5e18e7 comment-out tests provoking a low-level assert from debug CRT libs in MSVC 2008 (2005 probably affected too)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59635 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-20 01:03:38 +00:00
Francesco Montorsi
8e18d24865 fix constant value for 32bit machines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-19 20:30:27 +00:00
Francesco Montorsi
dad013ac01 extend wxXLocale with wxStrto[d,l,ul] functions; make wxXLocale::Init() a little bit smarter on Unix systems; make XLocaleTestCase not fail on systems where french/italian support is not installed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-19 18:05:49 +00:00
Francesco Montorsi
5b06a80f9f add a wxFont test unit (currently GetFamily and the Get/SetEncoding() bits are disabled because they fail on wxGTK -- need more investigation)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59610 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-18 15:32:28 +00:00
Vadim Zeitlin
306f34a368 allow using CPPUNIT_ASSERT_EQUAL(int,unsigned) even on 64 bit platforms (see r59576)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59592 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-17 22:02:56 +00:00
Francesco Montorsi
7ab4bb30bc don't fail on machines without french support installed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-16 15:47:39 +00:00
Francesco Montorsi
c653b0197a fix compilation with gcc 4.3.3 (and libcppunit 1.12.1); the compiler is confused by the many assertEqual() overloads
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-16 15:18:07 +00:00
Kevin Ollivier
2fd716136a Rebake after last change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59562 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-15 16:14:56 +00:00
Kevin Ollivier
0f425df617 Rebake after Mac bundle change.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59507 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-13 05:27:13 +00:00
Vadim Zeitlin
3a3b0bc2ea disable IPC test completely as it prevents the test program from running to completion when it hangs (for still unknown reason)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-11 13:15:45 +00:00
Václav Slavík
862bb5c73a renamed ATTRIBUTE_PRINTF to WX_ATTRIBUTE_PRINTF to avoid naming conflicts (e.g. with latest libxml2)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-11 07:51:38 +00:00
Vadim Zeitlin
072682ce44 optimize Replace() to use a linear algorithm (closes #9135)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59420 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-07 16:07:58 +00:00
Vadim Zeitlin
51acf83bd6 added wxZlibStream::SetDictionary() (closes #10551)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-06 16:26:15 +00:00
Kevin Ollivier
7da00c46e1 Land the rest of the changes made by a rebake after r59067.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 20:11:39 +00:00
Vadim Zeitlin
5293e4b710 replace templae Connect() overloads with separate Bind() method to improve compatibility (see #10000, closes #10477)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59134 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-25 17:43:22 +00:00
Francesco Montorsi
35d3edcd53 make the testcase more readable; add a few checks to Asterisk() test; make unicode part of S() test compile with MSVC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-18 14:57:42 +00:00
Francesco Montorsi
103339b01e fixed test failures under wxMSW when using our wxVsnprintf implementation (remains 1 bug introduced by the wx29 string changes)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58962 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-17 11:11:50 +00:00
Francesco Montorsi
6ceb7a2f36 revert debugging modifications and build into test.exe all non-GUI tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58961 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-17 10:42:53 +00:00
Vadim Zeitlin
d11c9d86b6 made wxArrayString::assign(iterator, iterator) a template function; also fixed a bad bug in it: it didn't call clear(); mention existence of std::vector-like methods in the docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-12 12:09:13 +00:00
Vadim Zeitlin
ab13878f7b fix other insert() overloads to work when inserting at the end of the list, continuation of r56299 (see #10103)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58742 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 23:46:53 +00:00
Vadim Zeitlin
1416fc5ff6 fix wxList::erase(it, end()) in non-STL build (see #10103)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 23:10:56 +00:00
Vadim Zeitlin
16be58c140 add semicolons after wxDEFINE_EVENT()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 21:04:47 +00:00
Vadim Zeitlin
bb87b19b16 compilation fix for wxEVENTS_COMPATIBILITY_2_8 case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-06 21:54:09 +00:00
Vadim Zeitlin
a01ada0599 allow handling events in a function taking the base class of the event class corresponding to the event type and not exactly the event class itself: this is more flexible (while still being safe) and incidentally fixes compatibility issues with existing code using explicit casts to wxObjectEventFunction (see #10477)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-06 18:33:01 +00:00
Vadim Zeitlin
f3ff831f3b Changes to template Connect() to make it compile with MSVC7 and possible other
not quite up-to-date compilers, to reduce repetitions and to allow using
methods of non-wxEvtHandler-derived classes as event callbacks:

1. Don't rely on compiler ability to deduce template parameter from the type
   of a parameter of a function used as another template parameter, at least
   MSVC7 can't do this and it's probably not the only one.
2. Do rely on compiler support for partial specialization to make
   wxEventFunctorMethod compile for non-wxEvtHandler-derived handlers while
   still keeping the old functionality for the wxEvtHandler-derived ones.
3. Don't make any difference between functions and functors, both are callable
   objects so use them as such, this allows to fold code for both cases.
4. Avoid the use of dynamic_cast<>.
5. Several naming changes:
 a) wxTypedEventType -> wxEventTypeTag (because this is what it is)
 b) Subscribe/Unsubscribe -> DoConnect/Disconnect (to follow the usual
    convention of public Foo calling private DoFoo and to avoid using up
    another name)
 c) Derived -> ObjClass (because it's not clear what does Derived mean)
6. Extend the unit test to cover more cases.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-02 20:38:56 +00:00
Vadim Zeitlin
4fc218c2a7 move evthandler.cpp to non-GUI test as it doesn't require the GUI
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 23:20:27 +00:00
Vadim Zeitlin
9b3ff3c04f test that the connected event handler is really called; some naming changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 23:19:45 +00:00
Vadim Zeitlin
b3f76d404f disable warning about using deprecated wxStripExtension() for MSVC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58612 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 22:20:59 +00:00
Vadim Zeitlin
b2238cc315 add a unit test for new events (see #10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58611 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-01 22:12:12 +00:00
Vadim Zeitlin
6b522db5c8 correct wxDateTime DST begin/end computations for years > 2006 in USA (closes #10425)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58486 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-28 21:52:37 +00:00
Francesco Montorsi
004867dbc5 Change in wxWindow the access specifier of the wxEvtHandler event processing and queuing functions
from public to protected. Adapt wxWidgets code and wxWidgets samples to always use wxWindow::GetEventHandler()
when calling such functions on a wxWindow rather than directly using wxWindow::ProcessEvent, etc.
This enables correct event dispatching to the event handlers which have been pushed (with PushEventHandler) on the 
windows.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-25 11:58:39 +00:00
Vadim Zeitlin
62e3e6c2bc fix wxURI::GetUser() for URIs without password; added unit test case for it (closes #10412)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58272 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-21 17:02:11 +00:00
Vadim Zeitlin
fa97ee2490 implement wxTreeCtrl::ItemHasChildren() properly for virtual root item; added unit test for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58177 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-17 13:16:25 +00:00
Vadim Zeitlin
9ebfc96354 compilation fix for VC7 which seems to somehow lose the default value for PopEventHandler() parameter inside scope guard templates
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58176 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-17 13:01:47 +00:00
Vadim Zeitlin
c21dcf80f0 add wx/app.h for PCH-less compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58172 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-17 11:38:32 +00:00
Vadim Zeitlin
a79fe526de add wx/window.h for MSVC compilation
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 23:01:04 +00:00
Vadim Zeitlin
166523d8d7 calling wcsnlen(NULL) does crash (under Debian and, according to the docs, should also crash with MSVC), contrary to what the comment claimed so don't do this
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 17:48:59 +00:00
Vadim Zeitlin
68888eeaa8 compilation fixes for 64 bit platforms
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58150 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 17:41:25 +00:00
Vadim Zeitlin
9eab67251b forward declare wxEvent before using it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58149 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 17:19:16 +00:00
Vadim Zeitlin
1649d2886b add a unit test checking that events are really propagated as they're supposed to
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-16 16:21:50 +00:00
Vadim Zeitlin
b44f5137ce link with wininet.lib under Windows to avoid linking errors in wxUSE_URL_NATIVE==1 build (#10338)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-15 13:33:51 +00:00
Francesco Montorsi
7c5ac499c8 provide our own implementation of wxStrnlen if it's not available; add tests for it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58069 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-13 12:01:30 +00:00
Francesco Montorsi
8d1a41016d assert when the item index is out of range in wxMSW's listctrl, just like generic listctrl does
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58055 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 19:34:42 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Francesco Montorsi
ef57fb9546 fix for the broken VC6 compiler (why do we have to still support it?)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-11 10:28:20 +00:00
Francesco Montorsi
9e48b1f56c add the 'GarbageTestCase' which helped me to spot some buggy load routines
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-11 00:39:22 +00:00
Francesco Montorsi
880706bedd disable test which asserted when trying to call wxListCtrl::GetItemRect() with an invalid index; not sure this is the best thing to do
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 17:40:32 +00:00
Francesco Montorsi
395f3aa8bd rewrite wxContractPath as wxFileName::ReplaceEnvVariable and wxFileName::ReplaceHomeDir; add test units and docs for them
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57867 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-07 00:38:46 +00:00
Vadim Zeitlin
b2eabfe866 abstract VC6 workaround inside a WX_CPPUNIT_ALLOW_EQUALS_TO_INT() macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57833 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-04 16:04:22 +00:00
Vadim Zeitlin
39e12b2d52 don't use \u in strings, VC6 doesn't support this
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-04 15:53:09 +00:00
Vadim Zeitlin
9540df9c2e use correct type for file offset
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57831 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-04 15:49:24 +00:00
Vadim Zeitlin
a54b285e7c allow using CPPUNIT_ASSERT_EQUAL(int, wxFileOffset) too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-04 00:47:10 +00:00
Vadim Zeitlin
3e98ba4589 trying to fix buildbot VC6 build error
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-03 19:29:46 +00:00
Vadim Zeitlin
1f30c75e44 fix memory leak in URL test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57664 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-30 13:18:22 +00:00
Vadim Zeitlin
16685812c1 run wxURL test both with and without the event loop too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57663 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-30 12:53:44 +00:00
Vadim Zeitlin
6799c5e283 added wxURL test
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57662 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-30 12:53:04 +00:00
Vadim Zeitlin
9f4204f7ee make the test really use the different socket flags and disable the use of wxSOCKET_NOWAIT as some tests fail in this case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57586 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 11:41:30 +00:00
Vadim Zeitlin
91bde3ec3e more CPPUNIT_ASSERT replacements with CPPUNIT_ASSERT_EQUAL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 11:22:59 +00:00
Vadim Zeitlin
1156062f77 also include wxSocket test in the GUI test as different event loop implementations may be used for console and GUI apps resulting in different bugs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 11:14:10 +00:00
Vadim Zeitlin
8d8087fc9b make the test really use the event loop in its second half (this already was the intention before but it didn't work correctly)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57582 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-27 11:12:47 +00:00
Vadim Zeitlin
6e7fd3ca03 test sockets both with and without event loop
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57574 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-26 22:58:20 +00:00
Vadim Zeitlin
c9e46deaa7 fix wxTimeSpan::Format() for negative spans with 0 hour component (#10055)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57474 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 12:16:06 +00:00
Vadim Zeitlin
c0ccc082e2 correct wrong #endif position which prevented ListCtrlTestCase::ItemRect() from being compiled under non-MSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57465 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:58:41 +00:00
Vadim Zeitlin
0468a58a4b don't show assert message boxes in debug build but throw an exception if an assert unexpectedly fails; do check that expected asserts are generated
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:28:55 +00:00
Vadim Zeitlin
6756186271 fix Get(Sub)ItemRect() after changes of r54437; added test for it (see #10175)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-12-21 02:13:58 +00:00