OLD | NEW |
1 /* | 1 /* |
2 ********************************************************************** | 2 ********************************************************************** |
3 * Copyright (C) 1999-2014, International Business Machines | 3 * Copyright (C) 1999-2014, International Business Machines |
4 * Corporation and others. All Rights Reserved. | 4 * Corporation and others. All Rights Reserved. |
5 ********************************************************************** | 5 ********************************************************************** |
6 * Date Name Description | 6 * Date Name Description |
7 * 12/09/99 aliu Ported from Java. | 7 * 12/09/99 aliu Ported from Java. |
8 ********************************************************************** | 8 ********************************************************************** |
9 */ | 9 */ |
10 | 10 |
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 if(U_FAILURE(status)) { | 452 if(U_FAILURE(status)) { |
453 errln("Unable to set the Thai collator clone to secondary strength"); | 453 errln("Unable to set the Thai collator clone to secondary strength"); |
454 return; | 454 return; |
455 } | 455 } |
456 compareArray(*coll2, tests, sizeof(tests)/sizeof(tests[0])); | 456 compareArray(*coll2, tests, sizeof(tests)/sizeof(tests[0])); |
457 | 457 |
458 const char *rule = "& c < ab"; | 458 const char *rule = "& c < ab"; |
459 const char *testcontraction[] = { "\\u0E41ab", ">", "\\u0E41c"}; // After UCA
4.1 Thai are normal so won't break a contraction | 459 const char *testcontraction[] = { "\\u0E41ab", ">", "\\u0E41c"}; // After UCA
4.1 Thai are normal so won't break a contraction |
460 UnicodeString rules; | 460 UnicodeString rules; |
461 parseChars(rules, rule); | 461 parseChars(rules, rule); |
462 LocalPointer<RuleBasedCollator> rcoll(new RuleBasedCollator(rules, status)); | 462 LocalPointer<RuleBasedCollator> rcoll(new RuleBasedCollator(rules, status), st
atus); |
463 if(U_SUCCESS(status)) { | 463 if(U_SUCCESS(status)) { |
464 compareArray(*rcoll, testcontraction, 3); | 464 compareArray(*rcoll, testcontraction, 3); |
465 } else { | 465 } else { |
466 errln("Couldn't instantiate collator from rules"); | 466 errln("Couldn't instantiate collator from rules"); |
467 } | 467 } |
468 | 468 |
469 } | 469 } |
470 | 470 |
471 | 471 |
472 #endif /* #if !UCONFIG_NO_COLLATION */ | 472 #endif /* #if !UCONFIG_NO_COLLATION */ |
OLD | NEW |