fixed memory leak in table unpack code; added Valgrind suppression file
[public/netxms.git] / tests / test-libnetxms / test-libnetxms.cpp
1 #include <nms_common.h>
2 #include <nms_util.h>
3 #include <nxqueue.h>
4 #include <testtools.h>
5
6 void TestMsgWaitQueue();
7 void TestMessageClass();
8
9 static char mbText[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
10 static WCHAR wcText[] = L"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.";
11 static char mbTextShort[] = "Lorem ipsum";
12 static UCS2CHAR ucs2TextShort[] = { 'L', 'o', 'r', 'e', 'm', ' ', 'i', 'p', 's', 'u', 'm', 0 };
13
14 /**
15 * Test string conversion
16 */
17 static void TestStringConversion()
18 {
19 StartTest(_T("ANSI to UCS-2 conversion"));
20 UCS2CHAR ucs2buffer[1024];
21 mb_to_ucs2(mbTextShort, -1, ucs2buffer, 1024);
22 AssertTrue(!memcmp(ucs2buffer, ucs2TextShort, sizeof(UCS2CHAR) * 12));
23 EndTest();
24
25 StartTest(_T("UCS-2 to ANSI conversion"));
26 char mbBuffer[1024];
27 ucs2_to_mb(ucs2TextShort, -1, mbBuffer, 1024);
28 AssertTrue(!strcmp(mbBuffer, mbTextShort));
29 EndTest();
30
31 StartTest(_T("ANSI to UCS-2 conversion performance"));
32 INT64 start = GetCurrentTimeMs();
33 for(int i = 0; i < 10000; i++)
34 {
35 UCS2CHAR buffer[1024];
36 mb_to_ucs2(mbText, -1, buffer, 1024);
37 }
38 EndTest(GetCurrentTimeMs() - start);
39
40 StartTest(_T("UCS-2 to ANSI conversion performance"));
41 mb_to_ucs2(mbText, -1, ucs2buffer, 1024);
42 start = GetCurrentTimeMs();
43 for(int i = 0; i < 10000; i++)
44 {
45 char buffer[1024];
46 ucs2_to_mb(ucs2buffer, -1, buffer, 1024);
47 }
48 EndTest(GetCurrentTimeMs() - start);
49
50 #ifdef UNICODE_UCS4
51 StartTest(_T("ANSI to UCS-4 conversion performance"));
52 start = GetCurrentTimeMs();
53 for(int i = 0; i < 10000; i++)
54 {
55 WCHAR buffer[1024];
56 MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, mbText, -1, buffer, 1024);
57 }
58 EndTest(GetCurrentTimeMs() - start);
59
60 StartTest(_T("UCS-4 to ANSI conversion performance"));
61 start = GetCurrentTimeMs();
62 for(int i = 0; i < 10000; i++)
63 {
64 char buffer[1024];
65 WideCharToMultiByte(CP_ACP, WC_COMPOSITECHECK | WC_DEFAULTCHAR, wcText, -1, buffer, 1024, NULL, NULL);
66 }
67 EndTest(GetCurrentTimeMs() - start);
68
69 StartTest(_T("UCS-2 to UCS-4 conversion performance"));
70 mb_to_ucs2(mbText, -1, ucs2buffer, 1024);
71 start = GetCurrentTimeMs();
72 for(int i = 0; i < 10000; i++)
73 {
74 WCHAR buffer[1024];
75 ucs2_to_ucs4(ucs2buffer, -1, buffer, 1024);
76 }
77 EndTest(GetCurrentTimeMs() - start);
78
79 StartTest(_T("UCS-4 to UCS-2 conversion performance"));
80 start = GetCurrentTimeMs();
81 for(int i = 0; i < 10000; i++)
82 {
83 UCS2CHAR buffer[1024];
84 ucs4_to_ucs2(wcText, -1, buffer, 1024);
85 }
86 EndTest(GetCurrentTimeMs() - start);
87 #endif
88 }
89
90 /**
91 * Test string map
92 */
93 static void TestStringMap()
94 {
95 StringMap *m = new StringMap();
96
97 StartTest(_T("String map - insert"));
98 INT64 start = GetCurrentTimeMs();
99 for(int i = 0; i < 10000; i++)
100 {
101 TCHAR key[64];
102 _sntprintf(key, 64, _T("key-%d"), i);
103 m->set(key, _T("Lorem ipsum dolor sit amet"));
104 }
105 AssertEquals(m->size(), 10000);
106 const TCHAR *v = m->get(_T("key-42"));
107 AssertNotNull(v);
108 AssertTrue(!_tcscmp(v, _T("Lorem ipsum dolor sit amet")));
109 EndTest(GetCurrentTimeMs() - start);
110
111 StartTest(_T("String map - replace"));
112 start = GetCurrentTimeMs();
113 for(int i = 0; i < 10000; i++)
114 {
115 TCHAR key[64];
116 _sntprintf(key, 64, _T("key-%d"), i);
117 m->set(key, _T("consectetur adipiscing elit"));
118 }
119 AssertEquals(m->size(), 10000);
120 v = m->get(_T("key-42"));
121 AssertNotNull(v);
122 AssertTrue(!_tcscmp(v, _T("consectetur adipiscing elit")));
123 EndTest(GetCurrentTimeMs() - start);
124
125 StartTest(_T("String map - get"));
126 start = GetCurrentTimeMs();
127 v = m->get(_T("key-888"));
128 AssertNotNull(v);
129 AssertTrue(!_tcscmp(v, _T("consectetur adipiscing elit")));
130 EndTest(GetCurrentTimeMs() - start);
131
132 StartTest(_T("String map - clear"));
133 start = GetCurrentTimeMs();
134 m->clear();
135 AssertEquals(m->size(), 0);
136 EndTest(GetCurrentTimeMs() - start);
137
138 delete m;
139 }
140
141 /**
142 * Test string set
143 */
144 static void TestStringSet()
145 {
146 StringSet *s = new StringSet();
147
148 StartTest(_T("String set - insert"));
149 INT64 start = GetCurrentTimeMs();
150 for(int i = 0; i < 10000; i++)
151 {
152 TCHAR key[64];
153 _sntprintf(key, 64, _T("key-%d lorem ipsum"), i);
154 s->add(key);
155 }
156 AssertEquals(s->size(), 10000);
157 AssertTrue(s->contains(_T("key-42 lorem ipsum")));
158 EndTest(GetCurrentTimeMs() - start);
159
160 StartTest(_T("String set - replace"));
161 start = GetCurrentTimeMs();
162 for(int i = 0; i < 10000; i++)
163 {
164 TCHAR key[64];
165 _sntprintf(key, 64, _T("key-%d lorem ipsum"), i);
166 s->add(key);
167 }
168 AssertEquals(s->size(), 10000);
169 AssertTrue(s->contains(_T("key-42 lorem ipsum")));
170 EndTest(GetCurrentTimeMs() - start);
171
172 StartTest(_T("String set - contains"));
173 start = GetCurrentTimeMs();
174 AssertTrue(s->contains(_T("key-888 lorem ipsum")));
175 EndTest(GetCurrentTimeMs() - start);
176
177 StartTest(_T("String set - iterator"));
178 Iterator<const TCHAR> *it = s->iterator();
179 AssertTrue(it->hasNext());
180 bool found = false;
181 while(it->hasNext())
182 {
183 const TCHAR *v = it->next();
184 AssertNotNull(v);
185 if (!_tcscmp(v, _T("key-42 lorem ipsum")))
186 {
187 found = true;
188 break;
189 }
190 }
191 AssertTrue(found);
192 it->remove();
193 AssertEquals(s->size(), 9999);
194 AssertFalse(s->contains(_T("key-42 lorem ipsum")));
195 delete it;
196 EndTest();
197
198 StartTest(_T("String set - clear"));
199 start = GetCurrentTimeMs();
200 s->clear();
201 AssertEquals(s->size(), 0);
202 EndTest(GetCurrentTimeMs() - start);
203
204 delete s;
205 }
206
207 /**
208 * Test string class
209 */
210 static void TestString()
211 {
212 String s;
213
214 StartTest(_T("String - append"));
215 for(int i = 0; i < 256; i++)
216 s.append(_T("ABC "));
217 AssertEquals(s.length(), 1024);
218 AssertTrue(!_tcsncmp(s.getBuffer(), _T("ABC ABC ABC ABC "), 16));
219 EndTest();
220
221 StartTest(_T("String - assign #1"));
222 s = _T("alpha");
223 AssertEquals(s.length(), 5);
224 AssertTrue(!_tcscmp(s.getBuffer(), _T("alpha")));
225 EndTest();
226
227 StartTest(_T("String - assign #2"));
228 String t(_T("init string"));
229 s = t;
230 AssertEquals(s.length(), 11);
231 AssertTrue(!_tcscmp(s.getBuffer(), _T("init string")));
232 EndTest();
233
234 StartTest(_T("String - shrink"));
235 s.shrink();
236 AssertEquals(s.length(), 10);
237 AssertTrue(!_tcscmp(s.getBuffer(), _T("init strin")));
238 EndTest();
239
240 StartTest(_T("String - escape"));
241 s.escapeCharacter('i', '+');
242 AssertEquals(s.length(), 13);
243 AssertTrue(!_tcscmp(s.getBuffer(), _T("+in+it str+in")));
244 EndTest();
245
246 StartTest(_T("String - replace #1"));
247 s = _T("alpha beta gamma");
248 s.replace(_T("beta"), _T("epsilon"));
249 AssertEquals(s.length(), 19);
250 AssertTrue(!_tcscmp(s.getBuffer(), _T("alpha epsilon gamma")));
251 EndTest();
252
253 StartTest(_T("String - replace #2"));
254 s = _T("alpha beta gamma");
255 s.replace(_T("beta"), _T("xxxx"));
256 AssertEquals(s.length(), 16);
257 AssertTrue(!_tcscmp(s.getBuffer(), _T("alpha xxxx gamma")));
258 EndTest();
259
260 StartTest(_T("String - replace #3"));
261 s = _T("alpha beta gamma alpha omega");
262 s.replace(_T("alpha"), _T("Z"));
263 AssertEquals(s.length(), 20);
264 AssertTrue(!_tcscmp(s.getBuffer(), _T("Z beta gamma Z omega")));
265 EndTest();
266
267 StartTest(_T("String - substring #1"));
268 s = _T("alpha beta gamma");
269 TCHAR *str = s.substring(0, 5);
270 AssertTrue(!_tcscmp(str, _T("alpha")));
271 free(str);
272 EndTest();
273
274 StartTest(_T("String - substring #2"));
275 s = _T("alpha beta gamma");
276 str = s.substring(5, -1);
277 AssertTrue(!_tcscmp(str, _T(" beta gamma")));
278 free(str);
279 EndTest();
280
281 StartTest(_T("String - substring #3"));
282 s = _T("alpha beta gamma");
283 str = s.substring(14, 4);
284 AssertTrue(!_tcscmp(str, _T("ma")));
285 free(str);
286 EndTest();
287 }
288
289 /**
290 * Test InetAddress class
291 */
292 static void TestInetAddress()
293 {
294 InetAddress a, b, c;
295
296 StartTest(_T("InetAddress - isSubnetBroadcast() - IPv4"));
297 a = InetAddress::parse("192.168.0.255");
298 AssertTrue(a.isSubnetBroadcast(24));
299 AssertFalse(a.isSubnetBroadcast(23));
300 EndTest();
301
302 StartTest(_T("InetAddress - isSubnetBroadcast() - IPv6"));
303 a = InetAddress::parse("fe80::ffff:ffff:ffff:ffff");
304 AssertFalse(a.isSubnetBroadcast(64));
305 AssertFalse(a.isSubnetBroadcast(63));
306 EndTest();
307
308 StartTest(_T("InetAddress - isLinkLocal() - IPv4"));
309 a = InetAddress::parse("169.254.17.198");
310 AssertTrue(a.isLinkLocal());
311 a = InetAddress::parse("192.168.1.1");
312 AssertFalse(a.isLinkLocal());
313 EndTest();
314
315 StartTest(_T("InetAddress - isLinkLocal() - IPv6"));
316 a = InetAddress::parse("fe80::1");
317 AssertTrue(a.isLinkLocal());
318 a = InetAddress::parse("2000:1234::1");
319 AssertFalse(a.isLinkLocal());
320 EndTest();
321
322 StartTest(_T("InetAddress - sameSubnet() - IPv4"));
323 a = InetAddress::parse("192.168.1.43");
324 a.setMaskBits(23);
325 b = InetAddress::parse("192.168.0.180");
326 b.setMaskBits(23);
327 c = InetAddress::parse("192.168.2.22");
328 c.setMaskBits(23);
329 AssertTrue(a.sameSubnet(b));
330 AssertFalse(a.sameSubnet(c));
331 EndTest();
332
333 StartTest(_T("InetAddress - sameSubnet() - IPv6"));
334 a = InetAddress::parse("2000:1234:1000:1000::1");
335 a.setMaskBits(62);
336 b = InetAddress::parse("2000:1234:1000:1001::cdef:1");
337 b.setMaskBits(62);
338 c = InetAddress::parse("2000:1234:1000:1007::1");
339 c.setMaskBits(62);
340 AssertTrue(a.sameSubnet(b));
341 AssertFalse(a.sameSubnet(c));
342 EndTest();
343
344 StartTest(_T("InetAddress - buildHashKey() - IPv4"));
345 a = InetAddress::parse("10.3.1.91");
346 BYTE key[18];
347 a.buildHashKey(key);
348 #if WORDS_BIGENDIAN
349 AssertTrue(memcmp(key, "\x06\x02\x0A\x03\x01\x5B\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 18) == 0);
350 #else
351 AssertTrue(memcmp(key, "\x06\x02\x5B\x01\x03\x0A\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00", 18) == 0);
352 #endif
353 EndTest();
354
355 StartTest(_T("InetAddress - buildHashKey() - IPv6"));
356 a = InetAddress::parse("fe80:1234::6e88:14ff:fec4:b8f8");
357 a.buildHashKey(key);
358 AssertTrue(memcmp(key, "\x12\x0A\xFE\x80\x12\x34\x00\x00\x00\x00\x6E\x88\x14\xFF\xFE\xC4\xB8\xF8", 18) == 0);
359 EndTest();
360 }
361
362 /**
363 * Test itoa/itow
364 */
365 static void TestItoa()
366 {
367 char buffer[64];
368 WCHAR wbuffer[64];
369
370 StartTest(_T("itoa"));
371 AssertTrue(!strcmp(_itoa(127, buffer, 10), "127"));
372 AssertTrue(!strcmp(_itoa(0, buffer, 10), "0"));
373 AssertTrue(!strcmp(_itoa(-3, buffer, 10), "-3"));
374 AssertTrue(!strcmp(_itoa(0555, buffer, 8), "555"));
375 AssertTrue(!strcmp(_itoa(0xFA48, buffer, 16), "fa48"));
376 EndTest();
377
378 StartTest(_T("itow"));
379 AssertTrue(!wcscmp(_itow(127, wbuffer, 10), L"127"));
380 AssertTrue(!wcscmp(_itow(0, wbuffer, 10), L"0"));
381 AssertTrue(!wcscmp(_itow(-3, wbuffer, 10), L"-3"));
382 AssertTrue(!wcscmp(_itow(0555, wbuffer, 8), L"555"));
383 AssertTrue(!wcscmp(_itow(0xFA48, wbuffer, 16), L"fa48"));
384 EndTest();
385 }
386
387 /**
388 * Test queue
389 */
390 static void TestQueue()
391 {
392 Queue *q = new Queue(16, 16);
393
394 StartTest(_T("Queue: put/get"));
395 for(int i = 0; i < 40; i++)
396 q->put(CAST_TO_POINTER(i + 1, void *));
397 AssertEquals(q->size(), 40);
398 AssertEquals(q->allocated(), 48);
399 for(int i = 0; i < 40; i++)
400 {
401 void *p = q->get();
402 AssertNotNull(p);
403 AssertEquals(CAST_FROM_POINTER(p, int), i + 1);
404 }
405 EndTest();
406
407 StartTest(_T("Queue: shrink"));
408 for(int i = 0; i < 60; i++)
409 q->put(CAST_TO_POINTER(i + 1, void *));
410 AssertEquals(q->size(), 60);
411 AssertEquals(q->allocated(), 64);
412 for(int i = 0; i < 55; i++)
413 {
414 void *p = q->get();
415 AssertNotNull(p);
416 AssertEquals(CAST_FROM_POINTER(p, int), i + 1);
417 }
418 AssertEquals(q->size(), 5);
419 AssertEquals(q->allocated(), 16);
420 EndTest();
421
422 delete q;
423 }
424
425 /**
426 * Key for hash map
427 */
428 typedef char HASH_KEY[6];
429
430 /**
431 * Test hash map
432 */
433 static void TestHashMap()
434 {
435 StartTest(_T("HashMap: create"));
436 HashMap<HASH_KEY, String> *hashMap = new HashMap<HASH_KEY, String>(true);
437 AssertEquals(hashMap->size(), 0);
438 EndTest();
439
440 HASH_KEY k1 = { '1', '2', '3', '4', '5', '6' };
441 HASH_KEY k2 = { '0', '0', 'a', 'b', 'c', 'd' };
442 HASH_KEY k3 = { '0', '0', '3', 'X', '1', '1' };
443
444 StartTest(_T("HashMap: set/get"));
445
446 hashMap->set(k1, new String(_T("String 1")));
447 hashMap->set(k2, new String(_T("String 2")));
448 hashMap->set(k3, new String(_T("String 3")));
449
450 String *s = hashMap->get(k1);
451 AssertNotNull(s);
452 AssertTrue(!_tcscmp(s->getBuffer(), _T("String 1")));
453
454 s = hashMap->get(k2);
455 AssertNotNull(s);
456 AssertTrue(!_tcscmp(s->getBuffer(), _T("String 2")));
457
458 s = hashMap->get(k3);
459 AssertNotNull(s);
460 AssertTrue(!_tcscmp(s->getBuffer(), _T("String 3")));
461
462 EndTest();
463
464 StartTest(_T("HashMap: replace"));
465 hashMap->set(k2, new String(_T("REPLACE")));
466 s = hashMap->get(k2);
467 AssertNotNull(s);
468 AssertTrue(!_tcscmp(s->getBuffer(), _T("REPLACE")));
469 EndTest();
470
471 StartTest(_T("HashMap: iterator"));
472 Iterator<String> *it = hashMap->iterator();
473 AssertTrue(it->hasNext());
474 s = it->next();
475 AssertNotNull(s);
476 AssertNotNull(it->next());
477 AssertNotNull(it->next());
478 AssertFalse(it->hasNext());
479 AssertNull(it->next());
480 AssertFalse(it->hasNext());
481 delete it;
482 EndTest();
483
484 StartTest(_T("HashMap: iterator remove"));
485 it = hashMap->iterator();
486 AssertTrue(it->hasNext());
487 AssertNotNull(it->next());
488 s = it->next();
489 AssertNotNull(s);
490 it->remove();
491 AssertTrue(it->hasNext());
492 AssertNotNull(it->next());
493 AssertFalse(it->hasNext());
494 AssertNull(it->next());
495 delete it;
496 AssertNotNull(hashMap->get(k1));
497 AssertNull(hashMap->get(k2));
498 AssertNotNull(hashMap->get(k3));
499 EndTest();
500
501 StartTest(_T("HashMap: remove"));
502 hashMap->remove(k3);
503 AssertNull(hashMap->get(k3));
504 EndTest();
505
506 StartTest(_T("HashMap: clear"));
507 hashMap->clear();
508 AssertEquals(hashMap->size(), 0);
509 it = hashMap->iterator();
510 AssertFalse(it->hasNext());
511 AssertNull(it->next());
512 delete it;
513 EndTest();
514
515 delete hashMap;
516 }
517
518 /**
519 * Test array
520 */
521 static void TestObjectArray()
522 {
523 StartTest(_T("ObjectArray: create"));
524 ObjectArray<String> *array = new ObjectArray<String>(16, 16, true);
525 AssertEquals(array->size(), 0);
526 EndTest();
527
528 StartTest(_T("ObjectArray: add/get"));
529 array->add(new String(_T("value 1")));
530 array->add(new String(_T("value 2")));
531 array->add(new String(_T("value 3")));
532 array->add(new String(_T("value 4")));
533 AssertEquals(array->size(), 4);
534 AssertNull(array->get(4));
535 AssertNotNull(array->get(1));
536 AssertTrue(!_tcscmp(array->get(1)->getBuffer(), _T("value 2")));
537 EndTest();
538
539 StartTest(_T("ObjectArray: replace"));
540 array->replace(0, new String(_T("replace")));
541 AssertEquals(array->size(), 4);
542 AssertTrue(!_tcscmp(array->get(0)->getBuffer(), _T("replace")));
543 EndTest();
544
545 StartTest(_T("ObjectArray: remove"));
546 array->remove(0);
547 AssertEquals(array->size(), 3);
548 AssertTrue(!_tcscmp(array->get(0)->getBuffer(), _T("value 2")));
549 EndTest();
550
551 StartTest(_T("ObjectArray: iterator"));
552 Iterator<String> *it = array->iterator();
553 AssertTrue(it->hasNext());
554 String *s = it->next();
555 AssertTrue(!_tcscmp(s->getBuffer(), _T("value 2")));
556 s = it->next();
557 AssertTrue(!_tcscmp(s->getBuffer(), _T("value 3")));
558 s = it->next();
559 AssertTrue(!_tcscmp(s->getBuffer(), _T("value 4")));
560 s = it->next();
561 AssertNull(s);
562 delete it;
563 EndTest();
564
565 delete array;
566 }
567
568 /**
569 * Table tests
570 */
571 static void TestTable()
572 {
573 StartTest(_T("Table: create"));
574 Table *table = new Table();
575 AssertEquals(table->getNumRows(), 0);
576 EndTest();
577
578 StartTest(_T("Table: set on empty table"));
579 table->set(0, 1.0);
580 table->set(1, _T("test"));
581 table->setPreallocated(1, _tcsdup(_T("test")));
582 AssertEquals(table->getNumRows(), 0);
583 EndTest();
584
585 StartTest(_T("Table: add row"));
586 table->addRow();
587 AssertEquals(table->getNumRows(), 1);
588 AssertEquals(table->getNumColumns(), 0);
589 EndTest();
590
591 StartTest(_T("Table: set on empty row"));
592 table->set(0, _T("test"));
593 table->setPreallocated(1, _tcsdup(_T("test")));
594 AssertEquals(table->getNumRows(), 1);
595 AssertEquals(table->getNumColumns(), 0);
596 EndTest();
597
598 table->addColumn(_T("NAME"));
599 table->addColumn(_T("VALUE"));
600 table->addColumn(_T("DATA1"));
601 table->addColumn(_T("DATA2"));
602 table->addColumn(_T("DATA3"));
603 table->addColumn(_T("DATA4"));
604 for(int i = 0; i < 50; i++)
605 {
606 table->addRow();
607 TCHAR b[64];
608 _sntprintf(b, 64, _T("Process #%d"), i);
609 table->set(0, b);
610 table->set(1, i);
611 table->set(2, i * 100);
612 table->set(3, i * 100001);
613 table->set(4, _T("/some/long/path/on/file/system"));
614 table->set(5, _T("constant"));
615 }
616
617 StartTest(_T("Table: pack"));
618 INT64 start = GetCurrentTimeMs();
619 char *packedTable = table->createPackedXML();
620 AssertNotNull(packedTable);
621 EndTest(GetCurrentTimeMs() - start);
622
623 StartTest(_T("Table: unpack"));
624 start = GetCurrentTimeMs();
625 Table *table2 = Table::createFromPackedXML(packedTable);
626 free(packedTable);
627 AssertNotNull(table2);
628 AssertEquals(table2->getNumColumns(), table->getNumColumns());
629 AssertEquals(table2->getNumRows(), table->getNumRows());
630 AssertEquals(table2->getAsInt(10, 1), table->getAsInt(10, 1));
631 EndTest(GetCurrentTimeMs() - start);
632
633 delete table;
634 delete table2;
635 }
636
637 /**
638 * main()
639 */
640 int main(int argc, char *argv[])
641 {
642 #ifdef _WIN32
643 WSADATA wsaData;
644 WSAStartup(MAKEWORD(2, 2), &wsaData);
645 #endif
646
647 TestString();
648 TestStringConversion();
649 TestStringMap();
650 TestStringSet();
651 TestMessageClass();
652 TestMsgWaitQueue();
653 TestInetAddress();
654 TestItoa();
655 TestQueue();
656 TestHashMap();
657 TestObjectArray();
658 TestTable();
659 return 0;
660 }