Home | History | Annotate | Download | only in tests

Lines Matching refs:utf16

294 		     const gunichar2 *utf16,
335 g_assert (result[i] == utf16[i]);
355 g_assert (result[i] == utf16[i]);
360 g_assert (result3[i] == utf16[i]);
368 check_utf16_to_utf8 (const gunichar2 *utf16,
380 result = g_utf16_to_utf8 (utf16, utf16_len, &items_read, &items_written, &error);
381 if (utf16[utf16_len] == 0)
385 result2 = g_utf16_to_utf8 (utf16, -1, &items_read2, &items_written2, &error2);
400 result3 = g_utf16_to_utf8 (utf16, utf16_len, NULL, NULL, &error3);
442 const gunichar2 *utf16,
495 g_assert (result[i] == utf16[i]);
500 g_assert (result3[i] == utf16[i]);
508 check_utf16_to_ucs4 (const gunichar2 *utf16,
521 result = g_utf16_to_ucs4 (utf16, utf16_len, &items_read, &items_written, &error);
522 if (utf16[utf16_len] == 0)
526 result2 = g_utf16_to_ucs4 (utf16, -1, &items_read2, &items_written2, &error2);
541 result3 = g_utf16_to_ucs4 (utf16, utf16_len, NULL, NULL, &error3);
588 gunichar2 utf16[100];
592 utf16[0] = 0x61; utf16[1] = 0x62; utf16[2] = 0x63; utf16[3] = 0;
596 check_utf8_to_utf16 (utf8, 3, utf16, 3, 0);
597 check_utf16_to_utf8 (utf16, 3, utf8, 3, 0);
598 check_ucs4_to_utf16 (ucs4, 3, utf16, 3, 0);
599 check_utf16_to_ucs4 (utf16, 3, ucs4, 3, 0);
603 utf16utf16[1] = 0x03b2; utf16[2] = 0x03b3; utf16[3] = 0;
607 check_utf8_to_utf16 (utf8, 6, utf16, 3, 0);
608 check_utf16_to_utf8 (utf16, 3, utf8, 6, 0);
609 check_ucs4_to_utf16 (ucs4, 3, utf16, 3, 0);
610 check_utf16_to_ucs4 (utf16, 3, ucs4, 3, 0);
615 utf16[0] = 0x61; utf16[1] = 0x62; utf16[2] = 0x63; utf16[3] = 0;
618 check_utf8_to_utf16 (utf8, 4, utf16, 3, 3);
623 utf16[0] = 0;
626 check_utf8_to_utf16 (utf8, 5, utf16, 0, 3);
628 /* partial utf16 character */
631 utf16[0] = 0x61; utf16[1] = 0x62; utf16[2] = 0xd801; utf16[3] = 0;
633 check_utf16_to_utf8 (utf16, 3, utf8, 2, 2);
634 check_utf16_to_ucs4 (utf16, 3, ucs4, 2, 2);
636 /* invalid utf16 */
639 utf16[0] = 0x61; utf16[1] = 0x62; utf16[2] = 0xdc01; utf16[3] = 0;
641 check_utf16_to_utf8 (utf16, 3, utf8, 0, 2);
642 check_utf16_to_ucs4 (utf16, 3, ucs4, 0, 2);
647 utf16[0] = 0;
650 check_ucs4_to_utf16 (ucs4, 3, utf16, 0, 2);