Vadim Zeitlin
c2c87924e7
use WX_ASSERT_STR/SIZET_EQUAL instead of CPPUNIT_ASSERT_EQUAL with casts
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48469 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-30 20:21:49 +00:00
Vadim Zeitlin
fe1b98f5d5
fix resize() when it's used for truncating a string in UTF-8 build; added test for this bug
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48464 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-30 18:13:29 +00:00
Václav Slavík
4734640692
fixed variadic templates in the case when char value is passed in place of (e.g.) %i or %d argument
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48224 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-20 19:20:10 +00:00
Václav Slavík
628f87da56
added wxUTF8StringBuffer for writing UTF8 data into wxString efficiently, similarly to existing wxStringBuffer classes
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-20 15:19:15 +00:00
Václav Slavík
74374c9ecd
Vadim's new test broke subsequent asserts, fixed
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48215 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-20 12:30:06 +00:00
Vadim Zeitlin
c8f313b256
added tests demonstrating a bug in wxString::assign(itself)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-08-20 10:38:22 +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
39c20230ba
1. added default constructors for wxString iterators
...
2. fixed assignment of iterator to iterator that points to a different string
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-28 12:49:58 +00:00
Václav Slavík
81e9dec6f5
use same names for test suites as the ones in ./test -l
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-28 07:54:15 +00:00
Václav Slavík
7978bc7293
remove implicit conversion to C strings from wxString if wxUSE_STL=1; this fixes problems with converting between wxString and std::string in some situations at the cost of having to use c_str() explicitly just as you have to when using std::string
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-20 07:47:51 +00:00
Vadim Zeitlin
105260e89f
overload wxStrpbrk() for more types and add tests for it
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46450 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 15:31:09 +00:00
Vadim Zeitlin
f291c98e52
use CPPUNIT_ASSERT_EQUAL instead of CPPUNIT_ASSERT as this gives more detailed information in case of a test failure
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 14:29:02 +00:00
Vadim Zeitlin
af9c764aa1
strWC used in the tests was supposed to be a wide string, not a narrow one
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 14:21:40 +00:00
Vadim Zeitlin
10de049c42
Unicode compilation fix: wxStrlocale() doesn't take wide strings
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-13 14:19:24 +00:00
Václav Slavík
52de37c78f
1. made CRT wrappers definitions indepenent of wxUSE_UNICODE: both ANSI and Unicode variants are now defined
...
2. split wxcrt.h into wxcrtbase.h with lowlevel compiler-specific definitions and wxcrt.h with ANSI- and Unicode-compatible wx wrappers
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46390 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-10 17:14:14 +00:00
Václav Slavík
eb6cb20793
fixed wxScanf() etc. to compile with Visual C++ again
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-06 13:48:24 +00:00
Václav Slavík
7652a41dc7
test if wxString(NULL) ctor creates empty string
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-31 11:00:06 +00:00
Václav Slavík
b0c4d5d792
fixed non-const wxString iterators to work when a character is changed to another with different UTF-8 sequence length
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46043 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-15 13:16:01 +00:00
Václav Slavík
0dc8d2242c
add test for passing c_str() of temporary wxString to Printf()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45990 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-12 10:11:04 +00:00
Václav Slavík
478cbb089e
test wxString::Mid() with non-ASCII strings
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45941 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-10 11:34:32 +00:00
Václav Slavík
76fc401aa5
added test for passing std::string to vararg functions
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45753 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-05-02 12:29:32 +00:00
Václav Slavík
baf3d1dc0a
added test for a crash when passing wxCStrData constructed from a literal (operator?: operand) to a vararg template
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-24 14:09:51 +00:00
Václav Slavík
9ffb659a29
fixed broken wxCStrData and operator?: check
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-24 12:35:30 +00:00
Václav Slavík
3a69bca110
added tests for wxCStrData::operator* and operator[]
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45538 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-19 18:28:26 +00:00
Václav Slavík
59953bf4ba
added conversion to and from std::string and std::wstring (if wxUSE_STD_STRING)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45519 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-17 15:32:05 +00:00
Vadim Zeitlin
f2a1b1bd23
added overloads taking pairs of const char/wchar_t pointers for wxString methods working with const_iterators for backwards compatibility with old wxString::const_iterator which used to be convertible to/from const wxChar *
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 21:55:29 +00:00
Václav Slavík
11aac4baa6
provide both const char* and const wchar_t* implicit conversion of wxCStrData regardless of the build type
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45262 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 21:28:14 +00:00
Vadim Zeitlin
9b59b90cda
fix another warning about unused variable in DoCStrDataTernaryOperator()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 14:19:18 +00:00
Vadim Zeitlin
abc505b493
fix warning about unused variable in DoCStrDataTernaryOperator()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45252 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-05 12:41:19 +00:00
Václav Slavík
92258cc146
some more operator?! tests
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45214 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-04-02 17:42:20 +00:00
Václav Slavík
ef0f138756
added char_str() and wchar_str() methods to wxString for obtaining char*/wchar_t* pointers
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-30 20:09:02 +00:00
Václav Slavík
d483da3c76
more wxString::append() tests
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45113 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-29 16:14:26 +00:00
Václav Slavík
359bd4d1a2
allow passing wx[W]CharBuffer to wx vararg templates
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-28 18:03:26 +00:00
Václav Slavík
4ca056ea2b
added test for operator?: and wxCStrData
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45096 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-28 09:40:22 +00:00
Václav Slavík
c9f7896861
first phase of transition to unified Unicode build:
...
1. changed c_str() to return wxCStrData (implicitly convertible to wxChar*)
2. added template type-safe wrappers for vararg functions
3. added wxUniChar class representing single Unicode character
4. changed wxString::operator[] and wxString::iterator to return wxUniChar
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44865 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-17 10:26:10 +00:00
Václav Slavík
d8a4b666cf
deprecated wxString::GetWriteBuf() and friends in favour of wxStringBuffer
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 20:01:52 +00:00
Václav Slavík
d7330233fd
allow creating wxString from char*, assigning to it from char* and comparing with char* values
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44543 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-20 20:05:43 +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
e74d43ab63
compilation fix for 64 bit platforms (where size_t is not unsigned int)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44447 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-11 02:03:34 +00:00
Vadim Zeitlin
b901ac2c3b
disabled wxMBConv(wxFONTENCODING_UTF7) test -- it doesn't work under Unix with iconv()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44256 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-19 00:19:57 +00:00
Vadim Zeitlin
0f0298b10c
added wxCSConv::IsOk() (patch 1637944)
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-01-18 20:39:10 +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
Vadim Zeitlin
db419f1f32
added test for Get/UngetWriteBuf()
...
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-27 15:03:24 +00:00