mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-1009 Improve code coverage of UTF-7
X-SVN-Rev: 6657
This commit is contained in:
parent
3cdc9c6def
commit
2506f08b4e
1 changed files with 5 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue