279 |
291 |
280 ////////////////////////////////////////////////////////////////////////////// |
292 ////////////////////////////////////////////////////////////////////////////// |
281 ////////////////////////////////////////////////////////////////////////////// |
293 ////////////////////////////////////////////////////////////////////////////// |
282 // 1, unicode -> 936 |
294 // 1, unicode -> 936 |
283 // test result: 1448 ms for 100000 iterations |
295 // test result: 1448 ms for 100000 iterations |
284 test.Printf(_L("unicode --> 936:\n")); |
296 INFO_PRINTF1(_L("unicode --> 936:\n")); |
285 test.Printf(_L(" source: ")); TestOut(unicode1); test.Printf(_L("\n")); |
297 INFO_PRINTF1(_L(" source: ")); TestOut(unicode1); INFO_PRINTF1(_L("\n")); |
286 test.Printf(_L(" expect: ")); TestOut(CP54936_1); test.Printf(_L("\n")); |
298 INFO_PRINTF1(_L(" expect: ")); TestOut(CP54936_1); INFO_PRINTF1(_L("\n")); |
287 prevTime = User::FastCounter(); |
299 prevTime = User::FastCounter(); |
288 for (count=0; count<MaxCount; count++) |
300 for (count=0; count<MaxCount; count++) |
289 { |
301 { |
290 foreign1.Zero(); |
302 foreign1.Zero(); |
291 (*aConvertFromUnicode936L)(foreign1, unicode1); |
303 (*aConvertFromUnicode936L)(foreign1, unicode1); |
292 } |
304 } |
293 timeDiff = User::FastCounter() - prevTime; |
305 timeDiff = User::FastCounter() - prevTime; |
294 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
306 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
295 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
307 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
296 test.Printf(_L(" result: ")); TestOut(foreign1); test.Printf(_L("\n")); |
308 INFO_PRINTF1(_L(" result: ")); TestOut(foreign1); INFO_PRINTF1(_L("\n")); |
297 test.Printf(msg); |
309 INFO_PRINTF1(msg); |
298 error = foreign1.Compare(CP54936_1); |
310 error = foreign1.Compare(CP54936_1); |
299 test(error==0); |
311 test(error==0); |
300 foreign1.Zero(); |
312 foreign1.Zero(); |
301 test.Printf(_L("\n")); |
313 INFO_PRINTF1(_L("\n")); |
302 |
314 |
303 // 2, unicode -> 54936 |
315 // 2, unicode -> 54936 |
304 // test result: 44 ms for 100000 iterations |
316 // test result: 44 ms for 100000 iterations |
305 test.Printf(_L("unicode --> 54936:\n")); |
317 INFO_PRINTF1(_L("unicode --> 54936:\n")); |
306 test.Printf(_L(" source: ")); TestOut(unicode1); test.Printf(_L("\n")); |
318 INFO_PRINTF1(_L(" source: ")); TestOut(unicode1); INFO_PRINTF1(_L("\n")); |
307 test.Printf(_L(" expect: ")); TestOut(CP54936_1); test.Printf(_L("\n")); |
319 INFO_PRINTF1(_L(" expect: ")); TestOut(CP54936_1); INFO_PRINTF1(_L("\n")); |
308 prevTime = User::FastCounter(); |
320 prevTime = User::FastCounter(); |
309 for (count=0; count<MaxCount; count++) |
321 for (count=0; count<MaxCount; count++) |
310 { |
322 { |
311 foreign1.Zero(); |
323 foreign1.Zero(); |
312 (*aConvertFromUnicode54936L)(foreign1, unicode1); |
324 (*aConvertFromUnicode54936L)(foreign1, unicode1); |
313 } |
325 } |
314 timeDiff = User::FastCounter() - prevTime; |
326 timeDiff = User::FastCounter() - prevTime; |
315 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
327 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
316 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
328 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
317 test.Printf(_L(" result: ")); TestOut(foreign1); test.Printf(_L("\n")); |
329 INFO_PRINTF1(_L(" result: ")); TestOut(foreign1); INFO_PRINTF1(_L("\n")); |
318 test.Printf(msg); |
330 INFO_PRINTF1(msg); |
319 error = foreign1.Compare(CP54936_1); |
331 error = foreign1.Compare(CP54936_1); |
320 test(error==0); |
332 test(error==0); |
321 foreign1.Zero(); |
333 foreign1.Zero(); |
322 test.Printf(_L("\n")); |
334 INFO_PRINTF1(_L("\n")); |
323 |
335 |
324 ////////////////////////////////////////////////////////////////////////////// |
336 ////////////////////////////////////////////////////////////////////////////// |
325 ////////////////////////////////////////////////////////////////////////////// |
337 ////////////////////////////////////////////////////////////////////////////// |
326 _LIT16(Uni_2, "\x0032\xFFFD\x7FB1\x0032\xFFFD\x7FB1\x7FB1"); |
338 _LIT16(Uni_2, "\x0032\xFFFD\x7FB1\x0032\xFFFD\x7FB1\x7FB1"); |
327 _LIT8(CP54936_2, "\x32\xC1\x7F\xC1\x7E\x32\xC1\x7F\xC1\x7E\xC1\x7E"); |
339 _LIT8(CP54936_2, "\x32\xC1\x7F\xC1\x7E\x32\xC1\x7F\xC1\x7E\xC1\x7E"); |
328 const TDesC8& foreign2(CP54936_2); |
340 const TDesC8& foreign2(CP54936_2); |
329 |
341 |
330 // 3, 936 -> unicode |
342 // 3, 936 -> unicode |
331 // test result: 89 ms for 100000 iterations |
343 // test result: 89 ms for 100000 iterations |
332 test.Printf(_L("936 ---> unicode:\n")); |
344 INFO_PRINTF1(_L("936 ---> unicode:\n")); |
333 test.Printf(_L(" source: ")); TestOut(foreign2); test.Printf(_L("\n")); |
345 INFO_PRINTF1(_L(" source: ")); TestOut(foreign2); INFO_PRINTF1(_L("\n")); |
334 test.Printf(_L(" expect: ")); TestOut(Uni_2); test.Printf(_L("\n")); |
346 INFO_PRINTF1(_L(" expect: ")); TestOut(Uni_2); INFO_PRINTF1(_L("\n")); |
335 prevTime = User::FastCounter(); |
347 prevTime = User::FastCounter(); |
336 for (count=0; count<MaxCount; count++) |
348 for (count=0; count<MaxCount; count++) |
337 { |
349 { |
338 unicode2.Zero(); |
350 unicode2.Zero(); |
339 (*aConvertToUnicode936L)(unicode2,foreign2); |
351 (*aConvertToUnicode936L)(unicode2,foreign2); |
340 } |
352 } |
341 timeDiff = User::FastCounter() - prevTime; |
353 timeDiff = User::FastCounter() - prevTime; |
342 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
354 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
343 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
355 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
344 test.Printf(_L(" result: ")); TestOut(unicode2); test.Printf(_L("\n")); |
356 INFO_PRINTF1(_L(" result: ")); TestOut(unicode2); INFO_PRINTF1(_L("\n")); |
345 test.Printf(msg); |
357 INFO_PRINTF1(msg); |
346 error = unicode2.Compare(Uni_2); |
358 error = unicode2.Compare(Uni_2); |
347 test(error==0); |
359 test(error==0); |
348 unicode2.Zero(); |
360 unicode2.Zero(); |
349 test.Printf(_L("\n")); |
361 INFO_PRINTF1(_L("\n")); |
350 |
362 |
351 // 4, 54936 -> unicode |
363 // 4, 54936 -> unicode |
352 // test result: 36 ms for 100000 iterations |
364 // test result: 36 ms for 100000 iterations |
353 test.Printf(_L("54936 ---> unicode:\n")); |
365 INFO_PRINTF1(_L("54936 ---> unicode:\n")); |
354 test.Printf(_L(" source: ")); TestOut(foreign2); test.Printf(_L("\n")); |
366 INFO_PRINTF1(_L(" source: ")); TestOut(foreign2); INFO_PRINTF1(_L("\n")); |
355 test.Printf(_L(" expect: ")); TestOut(Uni_2); test.Printf(_L("\n")); |
367 INFO_PRINTF1(_L(" expect: ")); TestOut(Uni_2); INFO_PRINTF1(_L("\n")); |
356 prevTime = User::FastCounter(); |
368 prevTime = User::FastCounter(); |
357 for (count=0; count<MaxCount; count++) |
369 for (count=0; count<MaxCount; count++) |
358 { |
370 { |
359 unicode2.Zero(); |
371 unicode2.Zero(); |
360 (*aConvertToUnicode54936L)(unicode2,foreign2); |
372 (*aConvertToUnicode54936L)(unicode2,foreign2); |
361 } |
373 } |
362 timeDiff = User::FastCounter() - prevTime; |
374 timeDiff = User::FastCounter() - prevTime; |
363 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
375 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
364 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
376 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
365 test.Printf(_L(" result: ")); TestOut(unicode2); test.Printf(_L("\n")); |
377 INFO_PRINTF1(_L(" result: ")); TestOut(unicode2); INFO_PRINTF1(_L("\n")); |
366 test.Printf(msg); |
378 INFO_PRINTF1(msg); |
367 error = unicode2.Compare(Uni_2); |
379 error = unicode2.Compare(Uni_2); |
368 test(error==0); |
380 test(error==0); |
369 unicode2.Zero(); |
381 unicode2.Zero(); |
370 test.Printf(_L("\n")); |
382 INFO_PRINTF1(_L("\n")); |
371 |
383 |
372 lib936.Close(); |
384 lib936.Close(); |
373 lib54936.Close(); |
385 lib54936.Close(); |
374 |
386 |
375 // test.Printf(_L("Press any key...\n")); |
387 // INFO_PRINTF1(_L("Press any key...\n")); |
376 // test.Getch(); |
388 // test.Getch(); |
377 } |
389 } |
378 |
390 |
379 |
391 |
380 // performance when converting mixed data. |
392 // performance when converting mixed data. |
381 // just for reference. |
393 // just for reference. |
382 // ideally, the test result should be similar to that in PerformanceTest1() |
394 // ideally, the test result should be similar to that in PerformanceTest1() |
383 void PerformanceTest2() |
395 void CT_CP54936::PerformanceTest2L() |
384 { |
396 { |
385 test.Next(_L("Performance test 2 (reference)")); |
397 INFO_PRINTF1(_L("Performance test 2 (reference)")); |
386 RLibrary lib54936; |
398 RLibrary lib54936; |
387 const TUidType serverUid54936(KNullUid,KNullUid,KPluginUid); |
399 const TUidType serverUid54936(KNullUid,KNullUid,KPluginUid); |
388 |
400 |
389 // load the dll |
401 // load the dll |
390 TInt returnValue2 = lib54936.Load(KName,serverUid54936); |
402 TInt returnValue2 = lib54936.Load(KName,serverUid54936); |
421 const TDesC16& unicode1(Uni_1); |
433 const TDesC16& unicode1(Uni_1); |
422 TInt error; |
434 TInt error; |
423 |
435 |
424 // 2, unicode -> 54936 |
436 // 2, unicode -> 54936 |
425 // test result: 130 ms for 100000 iterations (44 ms if one huge table for BMP characters) |
437 // test result: 130 ms for 100000 iterations (44 ms if one huge table for BMP characters) |
426 test.Printf(_L("unicode --> 54936:\n")); |
438 INFO_PRINTF1(_L("unicode --> 54936:\n")); |
427 test.Printf(_L(" source: ")); TestOut(unicode1); test.Printf(_L("\n")); |
439 INFO_PRINTF1(_L(" source: ")); TestOut(unicode1); INFO_PRINTF1(_L("\n")); |
428 test.Printf(_L(" expect: ")); TestOut(CP54936_1); test.Printf(_L("\n")); |
440 INFO_PRINTF1(_L(" expect: ")); TestOut(CP54936_1); INFO_PRINTF1(_L("\n")); |
429 prevTime = User::FastCounter(); |
441 prevTime = User::FastCounter(); |
430 for (count=0; count<MaxCount; count++) |
442 for (count=0; count<MaxCount; count++) |
431 { |
443 { |
432 foreign1.Zero(); |
444 foreign1.Zero(); |
433 (*aConvertFromUnicode54936L)(foreign1, unicode1); |
445 (*aConvertFromUnicode54936L)(foreign1, unicode1); |
434 } |
446 } |
435 timeDiff = User::FastCounter() - prevTime; |
447 timeDiff = User::FastCounter() - prevTime; |
436 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
448 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
437 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
449 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
438 test.Printf(_L(" result: ")); TestOut(foreign1); test.Printf(_L("\n")); |
450 INFO_PRINTF1(_L(" result: ")); TestOut(foreign1); INFO_PRINTF1(_L("\n")); |
439 test.Printf(msg); |
451 INFO_PRINTF1(msg); |
440 error = foreign1.Compare(CP54936_1); |
452 error = foreign1.Compare(CP54936_1); |
441 test(error==0); |
453 test(error==0); |
442 foreign1.Zero(); |
454 foreign1.Zero(); |
443 test.Printf(_L("\n")); |
455 INFO_PRINTF1(_L("\n")); |
444 |
456 |
445 ////////////////////////////////////////////////////////////////////////////// |
457 ////////////////////////////////////////////////////////////////////////////// |
446 ////////////////////////////////////////////////////////////////////////////// |
458 ////////////////////////////////////////////////////////////////////////////// |
447 _LIT16(Uni_2, "\x0032\x20AC\xFFFD\x7FB1\x47BB\xD840\xDC00"); |
459 _LIT16(Uni_2, "\x0032\x20AC\xFFFD\x7FB1\x47BB\xD840\xDC00"); |
448 _LIT8(CP54936_2, "\x32\xA2\xE3\xC1\x7F\xC1\x7E\x82\x33\xED\x33\x95\x32\x82\x36"); |
460 _LIT8(CP54936_2, "\x32\xA2\xE3\xC1\x7F\xC1\x7E\x82\x33\xED\x33\x95\x32\x82\x36"); |
449 const TDesC8& foreign2(CP54936_2); |
461 const TDesC8& foreign2(CP54936_2); |
450 |
462 |
451 // 4, 54936 -> unicode |
463 // 4, 54936 -> unicode |
452 // test result: 36 ms for 100000 iterations |
464 // test result: 36 ms for 100000 iterations |
453 test.Printf(_L("54936 ---> unicode:\n")); |
465 INFO_PRINTF1(_L("54936 ---> unicode:\n")); |
454 test.Printf(_L(" source: ")); TestOut(foreign2); test.Printf(_L("\n")); |
466 INFO_PRINTF1(_L(" source: ")); TestOut(foreign2); INFO_PRINTF1(_L("\n")); |
455 test.Printf(_L(" expect: ")); TestOut(Uni_2); test.Printf(_L("\n")); |
467 INFO_PRINTF1(_L(" expect: ")); TestOut(Uni_2); INFO_PRINTF1(_L("\n")); |
456 prevTime = User::FastCounter(); |
468 prevTime = User::FastCounter(); |
457 for (count=0; count<MaxCount; count++) |
469 for (count=0; count<MaxCount; count++) |
458 { |
470 { |
459 unicode2.Zero(); |
471 unicode2.Zero(); |
460 (*aConvertToUnicode54936L)(unicode2,foreign2); |
472 (*aConvertToUnicode54936L)(unicode2,foreign2); |
461 } |
473 } |
462 timeDiff = User::FastCounter() - prevTime; |
474 timeDiff = User::FastCounter() - prevTime; |
463 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
475 fsSessionMicroSecs = timeDiff / (ticksPerMicroSec); |
464 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
476 msg.Format(_L(" %10.2lf us, "), fsSessionMicroSecs); |
465 test.Printf(_L(" result: ")); TestOut(unicode2); test.Printf(_L("\n")); |
477 INFO_PRINTF1(_L(" result: ")); TestOut(unicode2); INFO_PRINTF1(_L("\n")); |
466 test.Printf(msg); |
478 INFO_PRINTF1(msg); |
467 error = unicode2.Compare(Uni_2); |
479 error = unicode2.Compare(Uni_2); |
468 test(error==0); |
480 test(error==0); |
469 unicode2.Zero(); |
481 unicode2.Zero(); |
470 test.Printf(_L("\n")); |
482 INFO_PRINTF1(_L("\n")); |
471 |
483 |
472 lib54936.Close(); |
484 lib54936.Close(); |
473 |
485 |
474 // test.Printf(_L("Press any key...\n")); |
486 // INFO_PRINTF1(_L("Press any key...\n")); |
475 // test.Getch(); |
487 // test.Getch(); |
476 } |
488 } |
477 |
489 |
478 /** |
490 /** |
479 @SYMTestCaseID TI18N-FATCHARCONV-CIT-4001 |
491 @SYMTestCaseID TI18N-FATCHARCONV-CIT-4001 |
569 5. Get four-byte Unicode codepoint |
581 5. Get four-byte Unicode codepoint |
570 6. Convert to/from GB18030 to/from Unicode |
582 6. Convert to/from GB18030 to/from Unicode |
571 @SYMTestExpectedResults No side effect |
583 @SYMTestExpectedResults No side effect |
572 @SYMREQ REQ12067 |
584 @SYMREQ REQ12067 |
573 */ |
585 */ |
574 LOCAL_C void TestGbConversion() |
586 void CT_CP54936::TestGbConversionL() |
575 { |
587 { |
576 // Test() function covers GB 1,2,4 bytes |
588 // TestL() function covers GB 1,2,4 bytes |
577 // one-byte |
589 // one-byte |
578 // border 0x80 |
590 // border 0x80 |
579 _LIT16(Uni_0, "\x0000"); |
591 _LIT16(Uni_0, "\x0000"); |
580 _LIT8(CP54936_0, "\x00"); |
592 _LIT8(CP54936_0, "\x00"); |
581 TestConversion( Uni_0, CP54936_0 ); |
593 TestConversionL( Uni_0, CP54936_0 ); |
582 |
594 |
583 _LIT16(Uni_1, "\x0079"); |
595 _LIT16(Uni_1, "\x0079"); |
584 _LIT8(CP54936_1, "\x79"); |
596 _LIT8(CP54936_1, "\x79"); |
585 TestConversion( Uni_1, CP54936_1 ); |
597 TestConversionL( Uni_1, CP54936_1 ); |
586 |
598 |
587 _LIT16(Uni_2, "\x0080"); |
599 _LIT16(Uni_2, "\x0080"); |
588 _LIT8(CP54936_2, "\x81\x30\x81\x30"); |
600 _LIT8(CP54936_2, "\x81\x30\x81\x30"); |
589 TestConversion( Uni_2, CP54936_2 ); |
601 TestConversionL( Uni_2, CP54936_2 ); |
590 |
602 |
591 _LIT16(Uni_3, "\x0081"); |
603 _LIT16(Uni_3, "\x0081"); |
592 _LIT8(CP54936_3, "\x81\x30\x81\x31"); |
604 _LIT8(CP54936_3, "\x81\x30\x81\x31"); |
593 TestConversion( Uni_3, CP54936_3 ); |
605 TestConversionL( Uni_3, CP54936_3 ); |
594 |
606 |
595 _LIT16(Uni_4, "\x00fe"); |
607 _LIT16(Uni_4, "\x00fe"); |
596 _LIT8(CP54936_4, "\x81\x30\x8B\x36"); |
608 _LIT8(CP54936_4, "\x81\x30\x8B\x36"); |
597 TestConversion( Uni_4, CP54936_4 ); |
609 TestConversionL( Uni_4, CP54936_4 ); |
598 |
610 |
599 _LIT16(Uni_5, "\x00ff"); |
611 _LIT16(Uni_5, "\x00ff"); |
600 _LIT8(CP54936_5, "\x81\x30\x8B\x37"); |
612 _LIT8(CP54936_5, "\x81\x30\x8B\x37"); |
601 TestConversion( Uni_5, CP54936_5 ); |
613 TestConversionL( Uni_5, CP54936_5 ); |
602 |
614 |
603 // two-byte |
615 // two-byte |
604 _LIT16(Uni_6, "\x0100"); |
616 _LIT16(Uni_6, "\x0100"); |
605 _LIT8(CP54936_6, "\x81\x30\x8B\x38"); |
617 _LIT8(CP54936_6, "\x81\x30\x8B\x38"); |
606 TestConversion( Uni_6, CP54936_6 ); |
618 TestConversionL( Uni_6, CP54936_6 ); |
607 |
619 |
608 _LIT16(Uni_7, "\x0101"); |
620 _LIT16(Uni_7, "\x0101"); |
609 _LIT8(CP54936_7, "\xA8\xA1"); |
621 _LIT8(CP54936_7, "\xA8\xA1"); |
610 TestConversion( Uni_7, CP54936_7 ); |
622 TestConversionL( Uni_7, CP54936_7 ); |
611 |
623 |
612 _LIT16(Uni_8, "\x0ffe"); |
624 _LIT16(Uni_8, "\x0ffe"); |
613 _LIT8(CP54936_8, "\x81\x33\x83\x38"); |
625 _LIT8(CP54936_8, "\x81\x33\x83\x38"); |
614 TestConversion( Uni_8, CP54936_8 ); |
626 TestConversionL( Uni_8, CP54936_8 ); |
615 |
627 |
616 _LIT16(Uni_9, "\x0fff"); |
628 _LIT16(Uni_9, "\x0fff"); |
617 _LIT8(CP54936_9, "\x81\x33\x83\x39"); |
629 _LIT8(CP54936_9, "\x81\x33\x83\x39"); |
618 TestConversion( Uni_9, CP54936_9 ); |
630 TestConversionL( Uni_9, CP54936_9 ); |
619 |
631 |
620 _LIT16(Uni_10, "\x1000"); |
632 _LIT16(Uni_10, "\x1000"); |
621 _LIT8(CP54936_10, "\x81\x33\x84\x30"); |
633 _LIT8(CP54936_10, "\x81\x33\x84\x30"); |
622 TestConversion( Uni_10, CP54936_10 ); |
634 TestConversionL( Uni_10, CP54936_10 ); |
623 |
635 |
624 _LIT16(Uni_11, "\x1001"); |
636 _LIT16(Uni_11, "\x1001"); |
625 _LIT8(CP54936_11, "\x81\x33\x84\x31"); |
637 _LIT8(CP54936_11, "\x81\x33\x84\x31"); |
626 TestConversion( Uni_11, CP54936_11 ); |
638 TestConversionL( Uni_11, CP54936_11 ); |
627 |
639 |
628 _LIT16(Uni_12, "\xfffe"); |
640 _LIT16(Uni_12, "\xfffe"); |
629 _LIT8(CP54936_12, "\x84\x31\xA4\x38"); |
641 _LIT8(CP54936_12, "\x84\x31\xA4\x38"); |
630 TestConversion( Uni_12, CP54936_12 ); |
642 TestConversionL( Uni_12, CP54936_12 ); |
631 |
643 |
632 _LIT16(Uni_13, "\xffff"); |
644 _LIT16(Uni_13, "\xffff"); |
633 _LIT8(CP54936_13, "\x84\x31\xA4\x39"); |
645 _LIT8(CP54936_13, "\x84\x31\xA4\x39"); |
634 TestConversion( Uni_13, CP54936_13 ); |
646 TestConversionL( Uni_13, CP54936_13 ); |
635 |
647 |
636 // four-byte |
648 // four-byte |
637 _LIT16(Uni_14, "\xd840\xdc00"); |
649 _LIT16(Uni_14, "\xd840\xdc00"); |
638 _LIT8(CP54936_14, "\x95\x32\x82\x36"); |
650 _LIT8(CP54936_14, "\x95\x32\x82\x36"); |
639 TestConversion( Uni_14, CP54936_14 ); |
651 TestConversionL( Uni_14, CP54936_14 ); |
640 |
652 |
641 _LIT16(Uni_15, "\xd840\xdc01"); |
653 _LIT16(Uni_15, "\xd840\xdc01"); |
642 _LIT8(CP54936_15, "\x95\x32\x82\x37"); |
654 _LIT8(CP54936_15, "\x95\x32\x82\x37"); |
643 TestConversion( Uni_15, CP54936_15 ); |
655 TestConversionL( Uni_15, CP54936_15 ); |
644 |
656 |
645 _LIT16(Uni_16, "\xD87F\xdffe"); |
657 _LIT16(Uni_16, "\xD87F\xdffe"); |
646 _LIT8(CP54936_16, "\x9a\x34\x84\x30"); |
658 _LIT8(CP54936_16, "\x9a\x34\x84\x30"); |
647 TestConversion( Uni_16, CP54936_16 ); |
659 TestConversionL( Uni_16, CP54936_16 ); |
648 |
660 |
649 _LIT16(Uni_17, "\xD87F\xdfff"); |
661 _LIT16(Uni_17, "\xD87F\xdfff"); |
650 _LIT8(CP54936_17, "\x9a\x34\x84\x31"); |
662 _LIT8(CP54936_17, "\x9a\x34\x84\x31"); |
651 TestConversion( Uni_17, CP54936_17 ); |
663 TestConversionL( Uni_17, CP54936_17 ); |
652 |
664 |
653 // 4-byte gb |
665 // 4-byte gb |
654 _LIT16(Uni_18, "\xd840\xddad"); |
666 _LIT16(Uni_18, "\xd840\xddad"); |
655 _LIT8(CP54936_18, "\x95\x32\xAD\x35"); |
667 _LIT8(CP54936_18, "\x95\x32\xAD\x35"); |
656 TestConversion( Uni_18, CP54936_18 ); |
668 TestConversionL( Uni_18, CP54936_18 ); |
657 |
669 |
658 _LIT16(Uni_19, "\xd801\xdd00"); |
670 _LIT16(Uni_19, "\xd801\xdd00"); |
659 _LIT8(CP54936_19, "\x90\x31\x83\x30"); |
671 _LIT8(CP54936_19, "\x90\x31\x83\x30"); |
660 TestConversion( Uni_19, CP54936_19 ); |
672 TestConversionL( Uni_19, CP54936_19 ); |
661 } |
673 } |
662 |
674 |
663 |
675 |
664 /** |
676 /** |
665 @SYMTestCaseID TI18N-CHARCONV-CT- |
677 @SYMTestCaseID TI18N-CHARCONV-CT- |