Lines Matching refs:ucnv_fromUChars
866 /*testing ucnv_fromUChars() and ucnv_toUChars() */
881 log_verbose("\n---Testing ucnv_fromUChars()\n");
882 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
888 log_verbose(" ucnv_fromUChars() o.k.\n");
925 /*Testing ucnv_fromUChars and ucnv_toUChars with error conditions*/
927 log_verbose("\n---Testing ucnv_fromUChars() with err != U_ZERO_ERROR\n");
928 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
930 log_err("\nFAILURE: ucnv_fromUChars with err != U_ZERO_ERROR is expected to fail and return 0\n");
933 log_verbose("\n---Testing ucnv_fromUChars() with converter=NULL\n");
934 targetcapacity = ucnv_fromUChars(NULL, output_cp_buffer, testLong1, uchar1, -1, &err);
936 log_err("\nFAILURE: ucnv_fromUChars with converter=NULL is expected to fail\n");
939 log_verbose("\n---Testing ucnv_fromUChars() with sourceLength = 0\n");
940 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, 0, &err);
942 log_err("\nFAILURE: ucnv_fromUChars with sourceLength 0 is expected to return 0\n");
944 log_verbose("\n---Testing ucnv_fromUChars() with targetLength = 0\n");
945 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, 0, uchar1, -1, &err);
947 log_err("\nFAILURE: ucnv_fromUChars with targetLength 0 is expected to fail and throw U_BUFFER_OVERFLOW_ERROR\n");
3544 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
3550 log_err("ucnv_fromUChars(UTF-16, U+D900) did not write a BOM\n");
3559 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
3565 log_err("ucnv_fromUChars(UTF-32, U+D900) did not write a BOM\n");
3732 length = ucnv_fromUChars(cnv, bytes, (int32_t)sizeof(bytes), a16, 1, &errorCode);