Lines Matching refs:ucnv_fromUChars
904 /*testing ucnv_fromUChars() and ucnv_toUChars() */
919 log_verbose("\n---Testing ucnv_fromUChars()\n");
920 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
926 log_verbose(" ucnv_fromUChars() o.k.\n");
963 /*Testing ucnv_fromUChars and ucnv_toUChars with error conditions*/
965 log_verbose("\n---Testing ucnv_fromUChars() with err != U_ZERO_ERROR\n");
966 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, -1, &err);
968 log_err("\nFAILURE: ucnv_fromUChars with err != U_ZERO_ERROR is expected to fail and return 0\n");
971 log_verbose("\n---Testing ucnv_fromUChars() with converter=NULL\n");
972 targetcapacity = ucnv_fromUChars(NULL, output_cp_buffer, testLong1, uchar1, -1, &err);
974 log_err("\nFAILURE: ucnv_fromUChars with converter=NULL is expected to fail\n");
977 log_verbose("\n---Testing ucnv_fromUChars() with sourceLength = 0\n");
978 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, testLong1, uchar1, 0, &err);
980 log_err("\nFAILURE: ucnv_fromUChars with sourceLength 0 is expected to return 0\n");
982 log_verbose("\n---Testing ucnv_fromUChars() with targetLength = 0\n");
983 targetcapacity = ucnv_fromUChars(myConverter, output_cp_buffer, 0, uchar1, -1, &err);
985 log_err("\nFAILURE: ucnv_fromUChars with targetLength 0 is expected to fail and throw U_BUFFER_OVERFLOW_ERROR\n");
3552 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
3558 log_err("ucnv_fromUChars(UTF-16, U+D900) did not write a BOM\n");
3567 length=ucnv_fromUChars(cnv, buffer, (int32_t)sizeof(buffer), surrogate, 1, &errorCode);
3573 log_err("ucnv_fromUChars(UTF-32, U+D900) did not write a BOM\n");
3740 length = ucnv_fromUChars(cnv, bytes, (int32_t)sizeof(bytes), a16, 1, &errorCode);