]> git.saurik.com Git - wxWidgets.git/blob - tests/strings/stdstrings.cpp
a50f65ab21f7b62672b8b36d6f4a6342c344f6d5
[wxWidgets.git] / tests / strings / stdstrings.cpp
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: tests/strings/stdstrings.cpp
3 // Purpose: wxString unit test
4 // Author: Vadim Zeitlin, Wlodzimierz ABX Skiba
5 // Created: 2004-05-07
6 // RCS-ID: $Id$
7 // Copyright: (c) 2004 Vadim Zeitlin, Wlodzimierz Skiba
8 ///////////////////////////////////////////////////////////////////////////////
9
10 // ----------------------------------------------------------------------------
11 // headers
12 // ----------------------------------------------------------------------------
13
14 #include "testprec.h"
15
16 #ifdef __BORLANDC__
17 #pragma hdrstop
18 #endif
19
20 #ifndef WX_PRECOMP
21 #include "wx/wx.h"
22 #endif // WX_PRECOMP
23
24 // ----------------------------------------------------------------------------
25 // test class
26 // ----------------------------------------------------------------------------
27
28 class StdStringTestCase : public CppUnit::TestCase
29 {
30 public:
31 StdStringTestCase();
32
33 private:
34 CPPUNIT_TEST_SUITE( StdStringTestCase );
35 CPPUNIT_TEST( StdConstructors );
36 CPPUNIT_TEST( StdAppend );
37 CPPUNIT_TEST( StdAssign );
38 CPPUNIT_TEST( StdCompare );
39 CPPUNIT_TEST( StdErase );
40 CPPUNIT_TEST( StdFind );
41 CPPUNIT_TEST( StdFindFirst );
42 CPPUNIT_TEST( StdFindLast );
43 CPPUNIT_TEST( StdInsert );
44 CPPUNIT_TEST( StdReplace );
45 CPPUNIT_TEST( StdRFind );
46 CPPUNIT_TEST( StdResize );
47 CPPUNIT_TEST( StdRiter );
48 CPPUNIT_TEST( StdSubstr );
49 CPPUNIT_TEST_SUITE_END();
50
51 void StdConstructors();
52 void StdAppend();
53 void StdAssign();
54 void StdCompare();
55 void StdErase();
56 void StdFind();
57 void StdFindFirst();
58 void StdFindLast();
59 void StdInsert();
60 void StdReplace();
61 void StdRFind();
62 void StdResize();
63 void StdRiter();
64 void StdSubstr();
65
66 DECLARE_NO_COPY_CLASS(StdStringTestCase)
67 };
68
69 // register in the unnamed registry so that these tests are run by default
70 CPPUNIT_TEST_SUITE_REGISTRATION( StdStringTestCase );
71
72 // also include in it's own registry so that these tests can be run alone
73 CPPUNIT_TEST_SUITE_NAMED_REGISTRATION( StdStringTestCase, "StdStringTestCase" );
74
75 StdStringTestCase::StdStringTestCase()
76 {
77 }
78
79 void StdStringTestCase::StdConstructors()
80 {
81 wxString s1(_T("abcdefgh")),
82 s2(_T("abcdefghijklm"), 8),
83 s3(_T("abcdefghijklm")),
84 s4(8, _T('a'));
85 wxString s5(s1),
86 s6(s3, 0, 8),
87 s7(s3.begin(), s3.begin() + 8);
88 wxString s8(s1, 4, 8);
89
90 CPPUNIT_ASSERT( s1 == _T("abcdefgh") );
91 CPPUNIT_ASSERT( s2 == s1 );
92 CPPUNIT_ASSERT( s4 == _T("aaaaaaaa") );
93 CPPUNIT_ASSERT( s5 == _T("abcdefgh") );
94 CPPUNIT_ASSERT( s6 == s1 );
95 CPPUNIT_ASSERT( s7 == s1 );
96 CPPUNIT_ASSERT( s8 == _T("efgh") );
97 }
98
99 void StdStringTestCase::StdAppend()
100 {
101 wxString s1, s2, s3, s4, s5, s6, s7, s8;
102
103 s1 = s2 = s3 = s4 = s5 = s6 = s7 = _T("abc");
104 s1.append(_T("def"));
105 s2.append(_T("defgh"), 3);
106 s3.append(wxString(_T("abcdef")), 3, 6);
107 s4.append(s1);
108 s5.append(3, _T('a'));
109 s5.append(2, 'x');
110 s5.append(1, (unsigned char)'y');
111 s6.append(s1.begin() + 3, s1.end());
112
113 CPPUNIT_ASSERT( s1 == _T("abcdef") );
114 CPPUNIT_ASSERT( s2 == _T("abcdef") );
115 CPPUNIT_ASSERT( s3 == _T("abcdef") );
116 CPPUNIT_ASSERT( s4 == _T("abcabcdef") );
117 CPPUNIT_ASSERT( s5 == _T("abcaaaxxy") );
118 CPPUNIT_ASSERT( s6 == _T("abcdef") );
119
120 s7 = s8 = wxString(_T("null\0time"), 9);
121
122 s7.append(_T("def"));
123 s8.append(_T("defgh"), 3);
124
125 CPPUNIT_ASSERT( s7 == wxString(_T("null\0timedef"), 12) );
126 CPPUNIT_ASSERT( s8 == wxString(_T("null\0timedef"), 12) );
127 }
128
129 void StdStringTestCase::StdAssign()
130 {
131 wxString s1, s2, s3, s4, s5, s6, s7, s8;
132
133 s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = _T("abc");
134 s1.assign(_T("def"));
135 s2.assign(_T("defgh"), 3);
136 s3.assign(wxString(_T("abcdef")), 3, 6);
137 s4.assign(s1);
138 s5.assign(3, _T('a'));
139 s6.assign(s1.begin() + 1, s1.end());
140
141 CPPUNIT_ASSERT( s1 == _T("def") );
142 CPPUNIT_ASSERT( s2 == _T("def") );
143 CPPUNIT_ASSERT( s3 == _T("def") );
144 CPPUNIT_ASSERT( s4 == _T("def") );
145 CPPUNIT_ASSERT( s5 == _T("aaa") );
146 CPPUNIT_ASSERT( s6 == _T("ef") );
147 }
148
149 void StdStringTestCase::StdCompare()
150 {
151 wxString s1, s2, s3, s4, s5, s6, s7, s8;
152
153 s1 = _T("abcdefgh");
154 s2 = _T("abcdefgh");
155 s3 = _T("abc");
156 s4 = _T("abcdefghi");
157 s5 = _T("aaa");
158 s6 = _T("zzz");
159
160 CPPUNIT_ASSERT( s1.compare(s2) == 0 );
161 CPPUNIT_ASSERT( s1.compare(s3) > 0 );
162 CPPUNIT_ASSERT( s1.compare(s4) < 0 );
163 CPPUNIT_ASSERT( s1.compare(s5) > 0 );
164 CPPUNIT_ASSERT( s1.compare(s6) < 0 );
165 CPPUNIT_ASSERT( s1.compare(1, 12, s1) > 0);
166 CPPUNIT_ASSERT( s1.compare(_T("abcdefgh")) == 0);
167 CPPUNIT_ASSERT( s1.compare(1, 7, _T("bcdefgh")) == 0);
168 CPPUNIT_ASSERT( s1.compare(1, 7, _T("bcdefgh"), 7) == 0);
169 }
170
171 void StdStringTestCase::StdErase()
172 {
173 wxString s1, s2, s3, s4, s5, s6, s7;
174
175 s1 = _T("abcdefgh");
176 s2 = _T("abcdefgh");
177 s3 = _T("abc");
178 s4 = _T("abcdefghi");
179 s5 = _T("aaa");
180 s6 = _T("zzz");
181 s7 = _T("zabcdefg");
182
183 s1.erase(1, 1);
184 s2.erase(4, 12);
185 wxString::iterator it = s3.erase(s3.begin() + 1);
186 wxString::iterator it2 = s4.erase(s4.begin() + 4, s4.begin() + 6);
187 wxString::iterator it3 = s7.erase(s7.begin() + 4, s7.begin() + 8);
188
189 CPPUNIT_ASSERT( s1 == _T("acdefgh") );
190 CPPUNIT_ASSERT( s2 == _T("abcd") );
191 CPPUNIT_ASSERT( s3 == _T("ac") );
192 CPPUNIT_ASSERT( s4 == _T("abcdghi") );
193 CPPUNIT_ASSERT( s7 == _T("zabc") );
194 CPPUNIT_ASSERT( *it == _T('c') );
195 CPPUNIT_ASSERT( *it2 == _T('g') );
196 CPPUNIT_ASSERT( it3 == s7.end() );
197 }
198
199 void StdStringTestCase::StdFind()
200 {
201 // 0 1 2
202 // 01234567890123456789012345
203 wxString s1 = _T("abcdefgABCDEFGabcABCabcABC");
204 wxString s2 = _T("gAB");
205
206 CPPUNIT_ASSERT( s1.find(_T('A')) == 7u );
207 CPPUNIT_ASSERT( s1.find(_T('A'), 7) == 7u );
208 CPPUNIT_ASSERT( s1.find(_T('Z')) == wxString::npos );
209 CPPUNIT_ASSERT( s1.find(_T('C'), 22) == 25u );
210
211 CPPUNIT_ASSERT( s1.find(_T("gAB")) == 6u );
212 CPPUNIT_ASSERT( s1.find(_T("gAB"), 7) == wxString::npos );
213 CPPUNIT_ASSERT( s1.find(_T("gAB"), 6) == 6u );
214
215 CPPUNIT_ASSERT( s1.find(_T("gABZZZ"), 2, 3) == 6u );
216 CPPUNIT_ASSERT( s1.find(_T("gABZZZ"), 7, 3) == wxString::npos );
217
218 CPPUNIT_ASSERT( s1.find(s2) == 6u );
219 CPPUNIT_ASSERT( s1.find(s2, 7) == wxString::npos );
220 CPPUNIT_ASSERT( s1.find(s2, 6) == 6u );
221
222 // 0 1 2
223 // 0123456 78901234567 8901234567
224 //wxString _s1 = _T("abcdefg\0ABCDEFGabc\0ABCabcABC");
225 //wxString _s2 = _T("g\0AB");
226 wxString _s1 = _T("abcdefgABCDEFGabcABCabcABC");
227 wxString _s2 = _T("gAB");
228
229 _s1.insert(7, 1, '\0');
230 _s1.insert(18, 1, '\0');
231 _s2.insert(1, 1, '\0');
232
233 CPPUNIT_ASSERT( _s1.find(_T('A')) == 8u );
234 CPPUNIT_ASSERT( _s1.find(_T('A'), 8) == 8u );
235 CPPUNIT_ASSERT( _s1.find(_T('Z')) == wxString::npos );
236 CPPUNIT_ASSERT( _s1.find(_T('C'), 22) == 27u );
237
238 CPPUNIT_ASSERT( _s1.find(_T("AB")) == 8u );
239 CPPUNIT_ASSERT( _s1.find(_T("AB"), 26) == wxString::npos );
240 CPPUNIT_ASSERT( _s1.find(_T("AB"), 23) == 25u );
241
242 CPPUNIT_ASSERT( _s1.find(_T("ABZZZ"), 2, 2) == 8u );
243 CPPUNIT_ASSERT( _s1.find(_T("ABZZZ"), 26, 2) == wxString::npos );
244
245 CPPUNIT_ASSERT( _s1.find(_s2) == 6u );
246 CPPUNIT_ASSERT( _s1.find(_s2, 7) == wxString::npos );
247 CPPUNIT_ASSERT( _s1.find(_s2, 6) == 6u );
248 }
249
250 void StdStringTestCase::StdFindFirst()
251 {
252 // 0 1 2 3
253 // 01234567890123456789012345678901234
254 wxString s1 = _T("aaaaaabcdefghlkjiaaaaaabcdbcdbcdbcd");
255 wxString s2 = _T("aaaaaa");
256
257 CPPUNIT_ASSERT( s1.find_first_not_of(_T('a')) == 6u );
258 CPPUNIT_ASSERT( s1.find_first_not_of(_T('a'), 7) == 7u );
259 CPPUNIT_ASSERT( s2.find_first_not_of(_T('a')) == wxString::npos );
260
261 CPPUNIT_ASSERT( s1.find_first_not_of(_T("abde"), 4) == 7u );
262 CPPUNIT_ASSERT( s1.find_first_not_of(_T("abde"), 7) == 7u );
263 CPPUNIT_ASSERT( s1.find_first_not_of(_T("abcdefghijkl")) == wxString::npos );
264
265 CPPUNIT_ASSERT( s1.find_first_not_of(_T("abcdefghi"), 0, 4) == 9u );
266
267 CPPUNIT_ASSERT( s1.find_first_of(_T('c')) == 7u );
268 CPPUNIT_ASSERT( s1.find_first_of(_T('v')) == wxString::npos );
269 CPPUNIT_ASSERT( s1.find_first_of(_T('c'), 10) == 24u );
270
271 CPPUNIT_ASSERT( s1.find_first_of(_T("ijkl")) == 13u );
272 CPPUNIT_ASSERT( s1.find_first_of(_T("ddcfg"), 17) == 24u );
273 CPPUNIT_ASSERT( s1.find_first_of(_T("ddcfga"), 17, 5) == 24u );
274 }
275
276 void StdStringTestCase::StdFindLast()
277 {
278 // 0 1 2 3
279 // 01234567890123456789012345678901234
280 wxString s1 = _T("aaaaaabcdefghlkjiaaaaaabcdbcdbcdbcd");
281 wxString s2 = _T("aaaaaa");
282
283 CPPUNIT_ASSERT( s2.find_last_not_of(_T('a')) == wxString::npos );
284 CPPUNIT_ASSERT( s1.find_last_not_of(_T('d')) == 33u );
285 CPPUNIT_ASSERT( s1.find_last_not_of(_T('d'), 25) == 24u );
286
287 CPPUNIT_ASSERT( s1.find_last_not_of(_T("bcd")) == 22u );
288 CPPUNIT_ASSERT( s1.find_last_not_of(_T("abc"), 24) == 16u );
289
290 CPPUNIT_ASSERT( s1.find_last_not_of(_T("abcdefghijklmnopqrstuv"), 24, 3) == 16u );
291
292 CPPUNIT_ASSERT( s2.find_last_of(_T('c')) == wxString::npos );
293 CPPUNIT_ASSERT( s1.find_last_of(_T('a')) == 22u );
294 CPPUNIT_ASSERT( s1.find_last_of(_T('b'), 24) == 23u );
295
296 CPPUNIT_ASSERT( s1.find_last_of(_T("ijklm")) == 16u );
297 CPPUNIT_ASSERT( s1.find_last_of(_T("ijklma"), 33, 4) == 16u );
298 CPPUNIT_ASSERT( s1.find_last_of(_T("a"), 17) == 17u );
299
300
301
302 // 0 1 2 3
303 // 012345 67890123456789 01234567890123456
304 // wxString s1 = _T("aaaaaa\0bcdefghlkjiaa\0aaaabcdbcdbcdbcd");
305 // wxString s2 = _T("aaaaaa\0");
306 s1.insert(6,1,'\0');
307 s1.insert(20,1,'\0');
308 s2.insert(6,1,'\0');
309
310 CPPUNIT_ASSERT( s2.find_last_not_of(_T('a')) == 6u );
311 CPPUNIT_ASSERT( s1.find_last_not_of(_T('d')) == 35u );
312 CPPUNIT_ASSERT( s1.find_last_not_of(_T('d'), 27) == 26u );
313
314 CPPUNIT_ASSERT( s1.find_last_not_of(_T("bcd")) == 24u );
315 CPPUNIT_ASSERT( s1.find_last_not_of(_T("abc"), 26) == 20u );
316
317 CPPUNIT_ASSERT( s1.find_last_not_of(_T("abcdefghijklmnopqrstuv"), 26, 3) == 20u );
318
319 CPPUNIT_ASSERT( s2.find_last_of(_T('c')) == wxString::npos );
320 CPPUNIT_ASSERT( s1.find_last_of(_T('a')) == 24u );
321 CPPUNIT_ASSERT( s1.find_last_of(_T('b'), 26) == 25u );
322
323 CPPUNIT_ASSERT( s1.find_last_of(_T("ijklm")) == 17u );
324 CPPUNIT_ASSERT( s1.find_last_of(_T("ijklma"), 35, 4) == 17u );
325 CPPUNIT_ASSERT( s1.find_last_of(_T("a"), 18) == 18u );
326 }
327
328 void StdStringTestCase::StdInsert()
329 {
330 wxString s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
331
332 s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = _T("aaaa");
333 s9 = s10 = _T("cdefg");
334
335 s1.insert(1, _T("cc") );
336 s2.insert(2, _T("cdef"), 3);
337 s3.insert(2, s10);
338 s4.insert(2, s10, 3, 7);
339 s5.insert(1, 2, _T('c'));
340 s6.insert(s6.begin() + 3, _T('X'));
341 s7.insert(s7.begin(), s9.begin(), s9.end() - 1);
342 s8.insert(s8.begin(), 2, _T('c'));
343
344 CPPUNIT_ASSERT( s1 == _T("accaaa") );
345 CPPUNIT_ASSERT( s2 == _T("aacdeaa") );
346 CPPUNIT_ASSERT( s3 == _T("aacdefgaa") );
347 CPPUNIT_ASSERT( s4 == _T("aafgaa") );
348 CPPUNIT_ASSERT( s5 == _T("accaaa") );
349 CPPUNIT_ASSERT( s6 == _T("aaaXa") );
350 CPPUNIT_ASSERT( s7 == _T("cdefaaaa") );
351 CPPUNIT_ASSERT( s8 == _T("ccaaaa") );
352
353 s1 = s2 = s3 = _T("aaaa");
354 s1.insert(0, _T("ccc"), 2);
355 s2.insert(4, _T("ccc"), 2);
356
357 CPPUNIT_ASSERT( s1 == _T("ccaaaa") );
358 CPPUNIT_ASSERT( s2 == _T("aaaacc") );
359 }
360
361 void StdStringTestCase::StdReplace()
362 {
363 wxString s1, s2, s3, s4, s5, s6, s7, s8, s9;
364
365 s1 = s2 = s3 = s4 = s5 = s6 = s7 = s8 = _T("QWERTYUIOP");
366 s9 = _T("werty");
367
368 s1.replace(3, 4, _T("rtyu"));
369 s1.replace(8, 7, _T("opopop"));
370 s2.replace(10, 12, _T("WWWW"));
371 s3.replace(1, 5, s9);
372 s4.replace(1, 4, s9, 0, 4);
373 s5.replace(1, 2, s9, 1, 12);
374 s6.replace(0, 123, s9, 0, 123);
375 s7.replace(2, 7, s9);
376
377 CPPUNIT_ASSERT( s1 == _T("QWErtyuIopopop") );
378 CPPUNIT_ASSERT( s2 == _T("QWERTYUIOPWWWW") );
379 CPPUNIT_ASSERT( s3 == _T("QwertyUIOP") );
380 CPPUNIT_ASSERT( s4 == _T("QwertYUIOP") );
381 CPPUNIT_ASSERT( s5 == _T("QertyRTYUIOP") );
382 CPPUNIT_ASSERT( s6 == s9);
383 CPPUNIT_ASSERT( s7 == _T("QWwertyP") );
384 }
385
386 void StdStringTestCase::StdRFind()
387 {
388 // 0 1 2
389 // 01234567890123456789012345
390 wxString s1 = _T("abcdefgABCDEFGabcABCabcABC");
391 wxString s2 = _T("gAB");
392 wxString s3 = _T("ab");
393
394 CPPUNIT_ASSERT( s1.rfind(_T('A')) == 23u );
395 CPPUNIT_ASSERT( s1.rfind(_T('A'), 7) == 7u );
396 CPPUNIT_ASSERT( s1.rfind(_T('Z')) == wxString::npos );
397 CPPUNIT_ASSERT( s1.rfind(_T('C'), 22) == 19u );
398
399 CPPUNIT_ASSERT( s1.rfind(_T("cAB")) == 22u );
400 CPPUNIT_ASSERT( s1.rfind(_T("cAB"), 15) == wxString::npos );
401 CPPUNIT_ASSERT( s1.rfind(_T("cAB"), 21) == 16u );
402
403 CPPUNIT_ASSERT( s1.rfind(_T("gABZZZ"), 7, 3) == 6u );
404 CPPUNIT_ASSERT( s1.rfind(_T("gABZZZ"), 5, 3) == wxString::npos );
405
406 CPPUNIT_ASSERT( s1.rfind(s2) == 6u );
407 CPPUNIT_ASSERT( s1.rfind(s2, 5) == wxString::npos );
408 CPPUNIT_ASSERT( s1.rfind(s2, 6) == 6u );
409 CPPUNIT_ASSERT( s1.rfind(s3, 1) == 0u );
410
411
412 // 0 1 2
413 // 01234 56789012 345678901234567
414 // wxString s1 = _T("abcde\0fgABCDE\0FGabcABCabcABC");
415 // wxString s2 = _T("gAB");
416 // wxString s3 = _T("ab");
417
418 s1.insert(5,1,'\0');
419 s1.insert(13,1,'\0');
420
421 CPPUNIT_ASSERT( s1.rfind(_T('A')) == 25u );
422 CPPUNIT_ASSERT( s1.rfind(_T('A'), 8) == 8u );
423 CPPUNIT_ASSERT( s1.rfind(_T('Z')) == wxString::npos );
424 CPPUNIT_ASSERT( s1.rfind(_T('C'), 22) == 21u );
425
426 CPPUNIT_ASSERT( s1.rfind(_T("cAB")) == 24u );
427 CPPUNIT_ASSERT( s1.rfind(_T("cAB"), 15) == wxString::npos );
428 CPPUNIT_ASSERT( s1.rfind(_T("cAB"), 21) == 18u );
429
430 CPPUNIT_ASSERT( s1.rfind(_T("gABZZZ"), 8, 3) == 7u );
431 CPPUNIT_ASSERT( s1.rfind(_T("gABZZZ"), 5, 3) == wxString::npos );
432 }
433
434 void StdStringTestCase::StdResize()
435 {
436 wxString s1, s2, s3, s4;
437
438 s1 = s2 = s3 = s4 = _T("abcABCdefDEF");
439
440 s1.resize( 12 );
441 s2.resize( 10 );
442 s3.resize( 14, _T(' ') );
443 s4.resize( 14, _T('W') );
444
445 CPPUNIT_ASSERT( s1 == _T("abcABCdefDEF") );
446 CPPUNIT_ASSERT( s2 == _T("abcABCdefD") );
447 CPPUNIT_ASSERT( s3 == _T("abcABCdefDEF ") );
448 CPPUNIT_ASSERT( s4 == _T("abcABCdefDEFWW") );
449 }
450
451 void StdStringTestCase::StdRiter()
452 {
453 const wxString s(_T("fozbar"));
454
455 wxString::const_reverse_iterator ri(s.rbegin());
456 CPPUNIT_ASSERT( _T('r') == *ri );
457 CPPUNIT_ASSERT( _T('a') == *++ri );
458 CPPUNIT_ASSERT( _T('r') == *--ri );
459
460 ri = s.rend();
461 ri--;
462 CPPUNIT_ASSERT( _T('f') == *ri );
463
464 --ri;
465 CPPUNIT_ASSERT( _T('o') == *ri );
466
467 wxString::const_iterator i = ri.base();
468 CPPUNIT_ASSERT( _T('z') == *i );
469 }
470
471 void StdStringTestCase::StdSubstr()
472 {
473 wxString s1 = _T("abcdefgABCDEFG");
474
475 CPPUNIT_ASSERT( s1.substr( 0, 14 ) == s1 );
476 CPPUNIT_ASSERT( s1.substr( 1, 13 ) == _T("bcdefgABCDEFG") );
477 CPPUNIT_ASSERT( s1.substr( 1, 20 ) == _T("bcdefgABCDEFG") );
478 CPPUNIT_ASSERT( s1.substr( 14, 30 ) == _T("") );
479
480 s1.insert(3,1,'\0');
481 s1.insert(8,1,'\0');
482 s1.insert(13,1,'\0');
483
484 wxString s2 = wxT("bcdefgABCDEFG");
485 s2.insert(2,1,'\0');
486 s2.insert(7,1,'\0');
487 s2.insert(12,1,'\0');
488
489 CPPUNIT_ASSERT( s1.substr( 0, 17 ) == s1 );
490 CPPUNIT_ASSERT( s1.substr( 1, 17 ) == s2 );
491 CPPUNIT_ASSERT( s1.substr( 1, 20 ) == s2 );
492 CPPUNIT_ASSERT( s1.substr( 17, 30 ) == _T("") );
493 }
494