+// © 2016 and later: Unicode, Inc. and others.
+// License & terms of use: http://www.unicode.org/copyright.html
/*
**********************************************************************
-* Copyright (C) 1999-2014, International Business Machines
+* Copyright (C) 1999-2016, International Business Machines
* Corporation and others. All Rights Reserved.
**********************************************************************
* Date Name Description
#include "unicode/sortkey.h"
#include "unicode/tblcoll.h"
#include "unicode/ustring.h"
+#include "cmemory.h"
#include "cstring.h"
#include "filestrm.h"
#include "textfile.h"
// Periods are ignored entirely
"\\u0e01.\\u0e01.", "<", "\\u0e01\\u0e32",
};
- const int32_t TESTS_length = (int32_t)(sizeof(TESTS)/sizeof(TESTS[0]));
+ const int32_t TESTS_length = UPRV_LENGTHOF(TESTS);
if (coll == 0) {
errln("Error: could not construct Thai collator");
CollationElementIterator* c = ((RuleBasedCollator *)coll)->createCollationElementIterator( iteratorText );
- for(i = 0; i < (int32_t)(sizeof(tests)/sizeof(tests[0])); i++) {
+ for(i = 0; i < UPRV_LENGTHOF(tests); i++) {
len = u_unescape(tests[i], strings[i], 20);
strings[i][len] = 0;
toSort[i] = strings[i];
errln("Unable to set the Thai collator clone to secondary strength");
return;
}
- compareArray(*coll2, tests, sizeof(tests)/sizeof(tests[0]));
+ compareArray(*coll2, tests, UPRV_LENGTHOF(tests));
const char *rule = "& c < ab";
const char *testcontraction[] = { "\\u0E41ab", ">", "\\u0E41c"}; // After UCA 4.1 Thai are normal so won't break a contraction