+ int32_t resLen = coll->getSortKey(buffer, buflen, newSk, 1024);
+
+ if(oldSk != NULL) {
+ int32_t skres = strcmp((char *)oldSk, (char *)newSk);
+ int32_t cmpres = coll->compare(oldB, oldBlen, buffer, buflen, status);
+ int32_t cmpres2 = coll->compare(buffer, buflen, oldB, oldBlen, status);
+
+ if(cmpres != -cmpres2) {
+ errln("Compare result not symmetrical on line %i", line);
+ }
+
+ if(cmpres != normalizeResult(skres)) {
+ errln("Difference between coll->compare (%d) and sortkey compare (%d) on line %i",
+ cmpres, skres, line);
+ errln(" Previous data line %s", oldLineB);
+ errln(" Current data line %s", lineB);
+ }
+
+ int32_t res = cmpres;
+ if(res == 0 && !isAtLeastUCA62) {
+ // Up to UCA 6.1, the collation test files use a custom tie-breaker,
+ // comparing the raw input strings.
+ res = u_strcmpCodePointOrder(oldB, buffer);
+ // Starting with UCA 6.2, the collation test files use the standard UCA tie-breaker,
+ // comparing the NFD versions of the input strings,
+ // which we do via setting strength=identical.
+ }
+ if(res > 0) {
+ errln("Line %i is not greater or equal than previous line", line);
+ errln(" Previous data line %s", oldLineB);
+ errln(" Current data line %s", lineB);
+ UnicodeString oldS, newS;
+ prettify(CollationKey(oldSk, oldLen), oldS);
+ prettify(CollationKey(newSk, resLen), newS);
+ errln(" Previous key: "+oldS);
+ errln(" Current key: "+newS);
+ }
+ }