+void ContractionTableTest::TestErrorCodeChecking(){
+ UErrorCode status = U_REGEX_SET_CONTAINS_STRING;
+
+ uprv_cnttab_open(NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_clone(NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_changeLastCE(NULL, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_insertContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_addContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_setContraction(NULL, 0, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_findCP(NULL, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ if (uprv_cnttab_getCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) {
+ errln("uprv_cnttab_getCE didn't return UCOL_NOT_FOUND\n");
+ }
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ if (uprv_cnttab_findCE(NULL, 0, 0, &status) != UCOL_NOT_FOUND) {
+ errln("uprv_cnttab_findCE didn't return UCOL_NOT_FOUND\n");
+ }
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_isTailored(NULL, 0, NULL, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+ uprv_cnttab_changeContraction(NULL, 0, 0, 0, &status);
+ if (status != U_REGEX_SET_CONTAINS_STRING) {
+ errln("Status was incorrectly modified to %s\n", u_errorName(status));
+ }
+}