Commit Graph

42 Commits

Author SHA1 Message Date
Vadim Zeitlin
bb5a951418 Use __WINDOWS__ for OS checks and __WXMSW__ for GUI checks (round 2).
This is continuation of r70796 and serves the same purpose.

Closes #14065, #14066.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70808 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-04 20:31:42 +00:00
Dimitri Schoolwerth
e3778b4d9c No code changes, fixed some typos.
Changed several occurrences of "it's" where "its" is meant, as well as a few other minor typos.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-04-30 10:57:04 +00:00
Vadim Zeitlin
43f8864bb0 Use wxUSING_VC_CRT_IO for MSVC CRT-specific test results.
Move USING_VC_CRT into testprec.h to allow its reuse in other files and rename
it to wxUSING_VC_CRT_IO as it only checks whether we're using MSVC STDIO
implementation and could be false even when we are otherwise using MSVC CRT.

Use this symbol for the tests whose result depends on the concrete version of
the CRT we use.

This fixes StringTestCase::FromDouble() failure under MinGW.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 17:16:00 +00:00
Vadim Zeitlin
051d655703 Fix VsnprintfTestCase for recent MinGW versions.
MinGW now uses its own printf() implementation which handles %p differently
from the VC CRT one and uses %8x instead of %8X for it. Compare the results of
wxPrintf("%p") case-insensitively to let the test pass in any case.

Also introduce a USING_VC_CRT macro instead of testing for
__USE_MINGW_ANSI_STDIO in two different places.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65738 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 17:15:10 +00:00
Vadim Zeitlin
89ff7e9fb1 Remove redundant wxUSE_WXVSNPRINTF checks from the unit test.
The entire VsnprintfTestCase is only used when using our own
wxUSE_WXVSNPRINTF so remove the redundant tests for it inside the enclosing #if.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65737 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-10-03 17:15:04 +00:00
Vadim Zeitlin
cdd233ef81 Expect an assert in wxVsnprintf() test with too many parameters.
The call to wxPrintf() should provoke an assert if there are too many
parameters, so update the test to expect it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-30 14:30:23 +00:00
Francesco Montorsi
3634064463 Move some wxPrintf() tests (taken from glibc) to VsnprintfTestCase. Other tests are more difficult to convert in CppUnit style and not worth the effort (since now we don't use wx's own vsnprintf implementation anymore typically).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64468 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-06-02 14:42:26 +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
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
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
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
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
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
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
Vadim Zeitlin
7ace5fd8e0 include wx/crt.h to get wxUSE_WXVSNPRINTF
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53904 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-01 16:58:17 +00:00
Vadim Zeitlin
05b5a45f96 don't run vsnprintf() test if we're using the system version, there is nothing we can do about its failures then anyhow
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53857 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-05-30 22:11:51 +00:00
Michael Wetherell
6ed28b941c Compile fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-02-20 22:28:02 +00:00
Vadim Zeitlin
5098c258b2 compilation fixes for VC6
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-13 01:13:03 +00:00
Vadim Zeitlin
b899f05f9e harmless warning fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47688 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-23 22:34:29 +00:00
Vadim Zeitlin
1a5cd56aac compilation fix for ANSI build (added #if wxUSE_UNICODE)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-07-04 20:35:42 +00:00
Václav Slavík
7315ad282d test wxVsnprintf() printing to both wchar_t* and char* buffers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47025 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-29 17:30:56 +00:00
Václav Slavík
b5c3f53e15 compilation fix
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44540 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-20 11:12:04 +00:00
Vadim Zeitlin
64b989fe0b suppress gcc warnings about invalid format strings
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-12 15:32:52 +00:00
Vadim Zeitlin
06b5b35265 don't run WrongFormatStrings test with system printf, it doesn't work
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-12 14:52:38 +00:00
Vadim Zeitlin
7de1a0d196 added test for %c and other minor changes (patch 1643843)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44453 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-11 02:23:19 +00:00
Vadim Zeitlin
b726328b48 added support and enable long long support when wxLongLong_t is available even if SIZEOF_LONG_LONG is not under wxMSW
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44128 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 16:58:17 +00:00
Vadim Zeitlin
f2bbe5b675 fixes and workarounds to return value of our own wxVsnprintf_() implementation: handle -1 as error and not an indication that there is not enough space (patch 1623077)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44122 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-07 16:17:28 +00:00
Vadim Zeitlin
b51abd7380 Unicode compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43876 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-12-09 15:58:32 +00:00
Michael Wetherell
cc4a79c0f0 A couple more tests.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-10 22:49:45 +00:00
Michael Wetherell
b95d098489 Additional tests for wxVsnprintf, originally to test the copy from the scratch,
but actually shows up problems elsewhere.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43217 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-09 01:25:23 +00:00
Michael Wetherell
5677ce32f2 Compile fix.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-23 15:39:54 +00:00
Vadim Zeitlin
5921d2f848 more printf() tests (slightly modified patch 1581936)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42232 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-22 11:41:44 +00:00
Vadim Zeitlin
412a5c570d wx printf() implementation bug fixes ('%' handling, thread safety, ...) and optimisations (patch 1548750)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41023 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-09-05 21:14:38 +00:00
Michael Wetherell
3c8813b6c0 Use CPPUNIT_ASSERT_EQUAL where possible to improve messages.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40925 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-30 08:39:06 +00:00
Michael Wetherell
10b7d13cdb Compile fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-28 12:30:17 +00:00
Vadim Zeitlin
829d1102d2 don't rely on system snprintf() for the tests (patch 1532503)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40584 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-08-13 01:08:35 +00:00
Vadim Zeitlin
247c23b466 fix handling of % in our printf implementation (part of patch 1462778)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-27 14:21:15 +00:00
Vadim Zeitlin
bacd54f604 fix the tests to pass with both gcc and msvc (2nd part of patch 1462778)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-30 17:22:04 +00:00
Vadim Zeitlin
7a828c7ffb wxVsnprintf() implementation with positional parameters support (patch 1462778); disabled for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39377 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-28 15:18:15 +00:00