+ /* Testing function coverage on bad input */
+ UErrorCode status = U_ZERO_ERROR;
+ uiter_setString(&sIter, NULL, 1);
+ uiter_setState(&sIter, 1, &status);
+ if (status != U_UNSUPPORTED_ERROR) {
+ errln("error: uiter_setState returned %s instead of U_UNSUPPORTED_ERROR", u_errorName(status));
+ }
+ status = U_ZERO_ERROR;
+ uiter_setState(NULL, 1, &status);
+ if (status != U_ILLEGAL_ARGUMENT_ERROR) {
+ errln("error: uiter_setState returned %s instead of U_ILLEGAL_ARGUMENT_ERROR", u_errorName(status));
+ }
+ if (uiter_getState(&sIter) != UITER_NO_STATE) {
+ errln("error: uiter_getState did not return UITER_NO_STATE on bad input");
+ }