Lines Matching refs:uf
482 hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
486 g_assert (hb_unicode_funcs_is_immutable (uf));
487 g_assert (hb_unicode_funcs_get_parent (uf));
497 g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, tests[j].value);
504 if (p->getter (uf, tests[j].unicode) != tests[j].value) {
505 g_test_message ("Soft fail: Received %x, expected %x", p->getter (uf, tests[j].unicode), tests[j].value);
522 _test_unicode_properties_nil (hb_unicode_funcs_t *uf)
534 g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
539 g_assert_cmphex (p->getter (uf, tests[j].unicode), ==, default_value (p->default_value, tests[j].unicode));
547 hb_unicode_funcs_t *uf = hb_unicode_funcs_create (NULL);
549 g_assert (!hb_unicode_funcs_is_immutable (uf));
550 _test_unicode_properties_nil (uf);
552 hb_unicode_funcs_destroy (uf);
558 hb_unicode_funcs_t *uf = hb_unicode_funcs_get_empty ();
560 g_assert (uf);
561 g_assert (hb_unicode_funcs_is_immutable (uf));
562 _test_unicode_properties_nil (uf);
569 hb_unicode_funcs_t *uf, *uf2;
573 uf = hb_unicode_funcs_create (NULL);
574 g_assert (!hb_unicode_funcs_is_immutable (uf));
576 uf2 = hb_unicode_funcs_create (uf);
577 g_assert (hb_unicode_funcs_is_immutable (uf));
578 hb_unicode_funcs_destroy (uf);
587 uf = hb_unicode_funcs_create (hb_unicode_funcs_get_default ());
588 g_assert (!hb_unicode_funcs_is_immutable (uf));
590 uf2 = hb_unicode_funcs_create (uf);
591 g_assert (hb_unicode_funcs_is_immutable (uf));
592 hb_unicode_funcs_destroy (uf);
605 hb_unicode_funcs_t *uf;
617 uf = hb_unicode_funcs_create (NULL);
618 g_assert (!hb_unicode_funcs_is_immutable (uf));
620 p->func_setter (uf, (get_func_t) simple_get_script, &data[0], free_up);
622 g_assert_cmphex (p->getter (uf, 'a'), ==, HB_SCRIPT_LATIN);
623 g_assert_cmphex (p->getter (uf, '0'), ==, HB_SCRIPT_UNKNOWN);
625 p->func_setter (uf, (get_func_t) NULL, NULL, NULL);
628 g_assert (!hb_unicode_funcs_is_immutable (uf));
629 hb_unicode_funcs_make_immutable (uf);
630 g_assert (hb_unicode_funcs_is_immutable (uf));
632 /* Since uf is immutable now, the following setter should do nothing. */
633 p->func_setter (uf, (get_func_t) a_is_for_arabic_get_script, &data[1], free_up);
636 hb_unicode_funcs_destroy (uf);
661 hb_unicode_funcs_t *uf, *aa;
663 uf = hb_unicode_funcs_create (NULL);
665 aa = hb_unicode_funcs_create (uf);
667 hb_unicode_funcs_destroy (uf);
683 hb_unicode_funcs_t *uf, *aa;
685 uf = hb_unicode_funcs_get_default ();
686 aa = hb_unicode_funcs_create (uf);
702 hb_unicode_funcs_t *uf, *aa;
704 uf = hb_unicode_funcs_create (NULL);
706 hb_unicode_funcs_set_script_func (uf, simple_get_script,
709 aa = hb_unicode_funcs_create (uf);
711 hb_unicode_funcs_destroy (uf);
713 /* make sure the 'uf' didn't get freed, since 'aa' holds a ref */
787 hb_unicode_funcs_t *uf = (hb_unicode_funcs_t *) user_data;
795 g_assert (!hb_unicode_compose (uf, 0x0041, 0x0042, &ab) && ab == 0);
796 g_assert (!hb_unicode_compose (uf, 0x0041, 0, &ab) && ab == 0);
797 g_assert (!hb_unicode_compose (uf, 0x0066, 0x0069, &ab) && ab == 0);
800 g_assert (!hb_unicode_compose (uf, 0x212B, 0, &ab) && ab == 0);
801 g_assert (!hb_unicode_compose (uf, 0x00C5, 0, &ab) && ab == 0);
802 g_assert (!hb_unicode_compose (uf, 0x2126, 0, &ab) && ab == 0);
803 g_assert (!hb_unicode_compose (uf, 0x03A9, 0, &ab) && ab == 0);
806 g_assert (!hb_unicode_compose (uf, 0x0308, 0x0301, &ab) && ab == 0); /* !0x0344 */
807 g_assert (!hb_unicode_compose (uf, 0x0F71, 0x0F72, &ab) && ab == 0); /* !0x0F73 */
810 g_assert (hb_unicode_compose (uf, 0x0041, 0x030A, &ab) && ab == 0x00C5);
811 g_assert (hb_unicode_compose (uf, 0x006F, 0x0302, &ab) && ab == 0x00F4);
812 g_assert (hb_unicode_compose (uf, 0x1E63, 0x0307, &ab) && ab == 0x1E69);
813 g_assert (hb_unicode_compose (uf, 0x0073, 0x0323, &ab) && ab == 0x1E63);
814 g_assert (hb_unicode_compose (uf, 0x0064, 0x0307, &ab) && ab == 0x1E0B);
815 g_assert (hb_unicode_compose (uf, 0x0064, 0x0323, &ab) && ab == 0x1E0D);
818 g_assert (hb_unicode_compose (uf, 0xD4CC, 0x11B6, &ab) && ab == 0xD4DB);
819 g_assert (hb_unicode_compose (uf, 0x1111, 0x1171, &ab) && ab == 0xD4CC);
820 g_assert (hb_unicode_compose (uf, 0xCE20, 0x11B8, &ab) && ab == 0xCE31);
821 g_assert (hb_unicode_compose (uf, 0x110E, 0x1173, &ab) && ab == 0xCE20);
827 g_assert (!hb_unicode_decompose (uf, 0x0041, &a, &b) && a == 0x0041 && b == 0);
828 g_assert (!hb_unicode_decompose (uf, 0xFB01, &a, &b) && a == 0xFB01 && b == 0);
829 g_assert (!hb_unicode_decompose (uf, 0x1F1EF, &a, &b) && a == 0x1F1EF && b == 0);
832 g_assert (hb_unicode_decompose (uf, 0x212B, &a, &b) && a == 0x00C5 && b == 0);
833 g_assert (hb_unicode_decompose (uf, 0x2126, &a, &b) && a == 0x03A9 && b == 0);
836 g_assert (hb_unicode_decompose (uf, 0x0344, &a, &b) && a == 0x0308 && b == 0x0301);
837 g_assert (hb_unicode_decompose (uf, 0x0F73, &a, &b) && a == 0x0F71 && b == 0x0F72);
840 g_assert (hb_unicode_decompose (uf, 0x00C5, &a, &b) && a == 0x0041 && b == 0x030A);
841 g_assert (hb_unicode_decompose (uf, 0x00F4, &a, &b) && a == 0x006F && b == 0x0302);
842 g_assert (hb_unicode_decompose (uf, 0x1E69, &a, &b) && a == 0x1E63 && b == 0x0307);
843 g_assert (hb_unicode_decompose (uf, 0x1E63, &a, &b) && a == 0x0073 && b == 0x0323);
844 g_assert (hb_unicode_decompose (uf, 0x1E0B, &a, &b) && a == 0x0064 && b == 0x0307);
845 g_assert (hb_unicode_decompose (uf, 0x1E0D, &a, &b) && a == 0x0064 && b == 0x0323);
848 g_assert (hb_unicode_decompose (uf, 0xD4DB, &a, &b) && a == 0xD4CC && b == 0x11B6);
849 g_assert (hb_unicode_decompose (uf, 0xD4CC, &a, &b) && a == 0x1111 && b == 0x1171);
850 g_assert (hb_unicode_decompose (uf, 0xCE31, &a, &b) && a == 0xCE20 && b == 0x11B8);
851 g_assert (hb_unicode_decompose (uf, 0xCE20, &a, &b) && a == 0x110E && b == 0x1173);
857 g_assert (hb_unicode_decompose_compatibility (uf, 0x0041, decomposed) == 0);
858 g_assert (hb_unicode_decompose_compatibility (uf, 0x1F632, decomposed) == 0);
861 g_assert (hb_unicode_decompose_compatibility (uf, 0x00B5, decomposed) == 1 && decomposed[0] == 0x03BC);
862 g_assert (hb_unicode_decompose_compatibility (uf, 0x03D6, decomposed) == 1 && decomposed[0] == 0x03C0);
865 g_assert (hb_unicode_decompose_compatibility (uf, 0xFB54, decomposed) == 1 && decomposed[0] == 0x067B);
869 g_assert (hb_unicode_decompose_compatibility (uf, 0xFDFA, decomposed) == 18 && decomposed[17] == 0x0645);
876 g_assert (hb_unicode_decompose_compatibility (uf, 0x2002, decomposed) == 1 && decomposed[0] == 0x0020);
877 g_assert (hb_unicode_decompose_compatibility (uf, 0x2003, decomposed) == 1 && decomposed[0] == 0x0020);
878 g_assert (hb_unicode_decompose_compatibility (uf, 0x2004, decomposed) == 1 && decomposed[0] == 0x0020);
879 g_assert (hb_unicode_decompose_compatibility (uf, 0x2005, decomposed) == 1 && decomposed[0] == 0x0020);
880 g_assert (hb_unicode_decompose_compatibility (uf, 0x2006, decomposed) == 1 && decomposed[0] == 0x0020);
881 g_assert (hb_unicode_decompose_compatibility (uf, 0x2008, decomposed) == 1 && decomposed[0] == 0x0020);
882 g_assert (hb_unicode_decompose_compatibility (uf, 0x2009, decomposed) == 1 && decomposed[0] == 0x0020);
883 g_assert (hb_unicode_decompose_compatibility (uf, 0x200A, decomposed) == 1 && decomposed[0] == 0x0020);
886 g_assert (hb_unicode_decompose_compatibility (uf, 0x0587, decomposed) == 2 &&
888 g_assert (hb_unicode_decompose_compatibility (uf, 0x2017, decomposed) == 2 &&
890 g_assert (hb_unicode_decompose_compatibility (uf, 0x2025, decomposed) == 2 &&
892 g_assert (hb_unicode_decompose_compatibility (uf, 0x2033, decomposed) == 2 &&
896 g_assert (hb_unicode_decompose_compatibility (uf, 0x2026, decomposed) == 3 &&
898 g_assert (hb_unicode_decompose_compatibility (uf, 0x2034, decomposed) == 3 &&
900 g_assert (hb_unicode_decompose_compatibility (uf, 0x213B, decomposed) == 3 &&