ICU-4092 Improve code coverage. Add some argument tests.

X-SVN-Rev: 16976
This commit is contained in:
George Rhoten 2004-12-21 01:31:24 +00:00
parent 2f8b690e51
commit 1036574f5b

View File

@ -1865,5 +1865,17 @@ TestUnicodeSet() {
ucnv_close(cnv);
}
errorCode = U_ZERO_ERROR;
ucnv_getUnicodeSet(NULL, set, UCNV_ROUNDTRIP_SET, &errorCode);
if (errorCode != U_ILLEGAL_ARGUMENT_ERROR) {
log_err("error: ucnv_getUnicodeSet(NULL) returned wrong status code %s\n", u_errorName(errorCode));
}
errorCode = U_PARSE_ERROR;
/* Make sure that it does nothing if an error is passed in. Difficult to proper test for. */
ucnv_getUnicodeSet(NULL, NULL, UCNV_ROUNDTRIP_SET, &errorCode);
if (errorCode != U_PARSE_ERROR) {
log_err("error: ucnv_getUnicodeSet(NULL) returned wrong status code %s\n", u_errorName(errorCode));
}
uset_close(set);
}