int main () { test_cmp (); /* Test comparison with non-BMP characters. */ { static const UNIT input1[] = { 0xF0, 0x9D, 0x94, 0x9E }; static const UNIT input2[] = { 0xEF, 0xBB, 0xBF, 0x00 }; ASSERT (U_CMP (input1, input2, 4) > 0); ASSERT (U_CMP (input2, input1, 4) < 0); } return 0; }
int main () { test_cmp (); /* Test comparison with non-BMP characters. */ { static const UNIT input1[] = { 0x1D51F }; static const UNIT input2[] = { 0xFEFF }; ASSERT (U_CMP (input1, input2, 1) > 0); ASSERT (U_CMP (input2, input1, 1) < 0); } return 0; }
int main () { test_cmp (); /* Test comparison with non-BMP characters, split into surrogates. */ { static const UNIT input1[] = { 0xD835, 0xDD1E }; static const UNIT input2[] = { 0xFEFF, 0xFFE5 }; ASSERT (U_CMP (input1, input2, 2) > 0); ASSERT (U_CMP (input2, input1, 2) < 0); ASSERT (U_CMP (input1, input2, 1) > 0); ASSERT (U_CMP (input2, input1, 1) < 0); } return 0; }