From db864477ae428ae4190f674000abe8ff87056cb3 Mon Sep 17 00:00:00 2001 From: Markus Scherer Date: Mon, 25 Oct 2010 23:06:37 +0000 Subject: [PATCH] ICU-7264 make some C test code more parallel with Java X-SVN-Rev: 28909 --- icu4c/source/test/cintltst/cmsccoll.c | 65 +++++++++++++-------------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/icu4c/source/test/cintltst/cmsccoll.c b/icu4c/source/test/cintltst/cmsccoll.c index 1d993eec70c..88861caa0dc 100644 --- a/icu4c/source/test/cintltst/cmsccoll.c +++ b/icu4c/source/test/cintltst/cmsccoll.c @@ -3604,8 +3604,39 @@ static void TestPrefixCompose(void) { static void TestRuleOptions(void) { /* values here are hardcoded and are correct for the current UCA * when the UCA changes, one might be forced to change these - * values. (\\u02d0, \\U00010FFFC etc...) + * values. */ + + /* + * These strings contain the last character before [variable top] + * and the first and second characters (by primary weights) after it. + * See FractionalUCA.txt. For example: + [last variable [0C FE, 05, 05]] # U+10A7F OLD SOUTH ARABIAN NUMERIC INDICATOR + [variable top = 0C FE] + [first regular [0D 0A, 05, 05]] # U+0060 GRAVE ACCENT + and + 00B4; [0D 0C, 05, 05] + * + * Note: Starting with UCA 6.0, the [variable top] collation element + * is not the weight of any character or string, + * which means that LAST_VARIABLE_CHAR_STRING sorts before [last variable]. + */ +#define LAST_VARIABLE_CHAR_STRING "\\U00010A7F" +#define FIRST_REGULAR_CHAR_STRING "\\u0060" +#define SECOND_REGULAR_CHAR_STRING "\\u00B4" + + /* + * This string has to match the character that has the [last regular] weight + * which changes with each UCA version. + * See the bottom of FractionalUCA.txt which says something like + [last regular [7A FE, 05, 05]] # U+1342E EGYPTIAN HIEROGLYPH AA032 + * + * Note: Starting with UCA 6.0, the [last regular] collation element + * is not the weight of any character or string, + * which means that LAST_REGULAR_CHAR_STRING sorts before [last regular]. + */ +#define LAST_REGULAR_CHAR_STRING "\\U0001342E" + static const struct { const char *rules; const char *data[10]; @@ -3645,24 +3676,6 @@ static void TestRuleOptions(void) { { "c", "b", "\\u0009", "a", "\\u000a" }, 5 }, - /* - * These strings contain the last character before [variable top] - * and the first and second characters (by primary weights) after it. - * See FractionalUCA.txt. For example: - [last variable [0C FE, 05, 05]] # U+10A7F OLD SOUTH ARABIAN NUMERIC INDICATOR - [variable top = 0C FE] - [first regular [0D 0A, 05, 05]] # U+0060 GRAVE ACCENT - and - 00B4; [0D 0C, 05, 05] - * - * Note: Starting with UCA 6.0, the [variable top] collation element - * is not the weight of any character or string, - * which means that LAST_VARIABLE_CHAR_STRING sorts before [last variable]. - */ -#define LAST_VARIABLE_CHAR_STRING "\\U00010A7F" -#define FIRST_REGULAR_CHAR_STRING "\\u0060" -#define SECOND_REGULAR_CHAR_STRING "\\u00B4" - { "&[last variable]