From 2506f08b4e0aa0537bb4747cc00d31d44b76b9f4 Mon Sep 17 00:00:00 2001 From: George Rhoten Date: Wed, 7 Nov 2001 01:03:53 +0000 Subject: [PATCH] ICU-1009 Improve code coverage of UTF-7 X-SVN-Rev: 6657 --- icu4c/source/test/cintltst/nucnvtst.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/icu4c/source/test/cintltst/nucnvtst.c b/icu4c/source/test/cintltst/nucnvtst.c index d59d34fb8ae..98d98478736 100644 --- a/icu4c/source/test/cintltst/nucnvtst.c +++ b/icu4c/source/test/cintltst/nucnvtst.c @@ -1346,6 +1346,7 @@ static TestUTF7() { 7, 0x10401 }; + const char *cnvName; const char *source=(const char *)in, *limit=(const char *)in+sizeof(in); UErrorCode errorCode=U_ZERO_ERROR; UConverter *cnv=ucnv_open("UTF-7", &errorCode); @@ -1356,6 +1357,10 @@ static TestUTF7() { TestNextUChar(cnv, source, limit, results, "UTF-7"); /* Test the condition when source >= sourceLimit */ TestNextUCharError(cnv, source, source, U_INDEX_OUTOFBOUNDS_ERROR, "sourceLimit <= source"); + cnvName = ucnv_getName(cnv, &errorCode); + if (U_FAILURE(errorCode) || uprv_strcmp(cnvName, "UTF-7") != 0) { + log_err("UTF-7 converter is called %s: %s\n", cnvName, u_errorName(errorCode)); + } ucnv_close(cnv); }