+
+ // Check the UParseError for integrity.
+ // If an option is present, the option is wrong; error offset is at the start of the option
+ // If an option is not present, the error offset is at the token separator (end of stem)
+ int32_t expectedOffset = u_strlen(stem) + ((suffix[0] == u'/') ? 1 : 0);
+ assertEquals(skeletonString, expectedOffset, perror.offset);
+ UnicodeString expectedPreContext = skeletonString.tempSubString(0, expectedOffset);
+ if (expectedPreContext.length() >= U_PARSE_CONTEXT_LEN - 1) {
+ expectedPreContext = expectedPreContext.tempSubString(expectedOffset - U_PARSE_CONTEXT_LEN + 1);
+ }
+ assertEquals(skeletonString, expectedPreContext, perror.preContext);
+ UnicodeString expectedPostContext = skeletonString.tempSubString(expectedOffset);
+ // None of the postContext strings in this test exceed U_PARSE_CONTEXT_LEN
+ assertEquals(skeletonString, expectedPostContext, perror.postContext);