ICU-1930 Shifted test moved to data driven tests

X-SVN-Rev: 9167
This commit is contained in:
Vladimir Weinstein 2002-07-15 22:53:00 +00:00
parent 1075b8e64d
commit 45d4fa9afd

View File

@ -3572,102 +3572,9 @@ static void TestRuleOptions(void) {
} }
} }
static void TestIgnorableShifted(void) {
#if 0
Mark a <space> <acute> b
Mark vs
Mark A <space> b
Mark I think those should differ.
weiv these should be equal when shifted but different when non ignorable, right
weiv except capital A would sort after lower case a
Mark OLD implementation: IGNOREABLE: #1 > #2
Mark NEW implemenation: IGNOREABLE: #2 > #1
Mark NON-IGNOREABLE: #1 > #2
"a<space>b","A<space>b","a<space><grave>b","A<space><grave>b","a\\0300b","A<grave>b"
"A<space>\\u300b","a<space><grave>b","A<space>b","a<grave>b","A<grave>b"
#endif
static struct {
const char *data[50];
const uint32_t len;
const UColAttribute att[2];
const UColAttributeValue value[2];
} tests[] = {
{
{ "a \\u0300b", "a b", "A \\u0300b", "A b", "a\\u0300b", "A\\u0300b"}, 5,
{ UCOL_ALTERNATE_HANDLING, UCOL_STRENGTH }, { UCOL_SHIFTED, UCOL_QUATERNARY }
},
{
{"a b", "A b", "a \\u0300b", "A \\u0300b", "a\\u0300b", "A\\u0300b"}, 6,
{ UCOL_ALTERNATE_HANDLING, UCOL_STRENGTH }, { UCOL_NON_IGNORABLE, UCOL_TERTIARY }
},
{
{
#if 0
"a<space>b",
"A<space>b",
"a<space><grave>b",
"A<space><grave>b",
"a<grave>b",
"A<grave>b"
"a<lowline>b",
"A<lowline>b",
"a<lowline><grave>b",
"A<lowline><grave>b",
"a<grave>b",
"A<grave>b"
"a<space>b",
"A<space>b",
"a<space><acute>b",
"A<space><acute>b",
"a<acute>b",
"A<acute>b"
"a<lowline>b",
"A<lowline>b",
"a<lowline><acute>b",
"A<lowline><acute>b",
"a<acute>b",
"A<acute>b"
#endif
"a b",
"A b",
"a \\u0300b",
"A \\u0300b",
"a\\u0300b",
"A\\u0300b",
"a\\u005fb",
"A\\u005fb",
"a\\u005f\\u0300b",
"A\\u005f\\u0300b",
"a\\u0300b",
"A\\u0300b",
"a b",
"A b",
"a \\u0301b",
"A \\u0301b",
"a\\u0301b",
"A\\u0301b",
"a\\u005fb",
"A\\u005fb",
"a\\u005f\\u0301b",
"A\\u005f\\u0301b",
"a\\u0301b",
"A\\u0301b"
}, 22,
{ UCOL_ALTERNATE_HANDLING, UCOL_STRENGTH }, { UCOL_SHIFTED, UCOL_QUATERNARY }
/*{ UCOL_ALTERNATE_HANDLING, UCOL_STRENGTH }, { UCOL_NON_IGNORABLE, UCOL_TERTIARY }*/
}
};
int32_t i = 0;
for(i = 0; i<sizeof(tests)/sizeof(tests[0]); i++) {
genericLocaleStarterWithOptions("", tests[i].data, tests[i].len, tests[i].att, tests[i].value, 2);
}
}
void addMiscCollTest(TestNode** root) void addMiscCollTest(TestNode** root)
{ {
/*addTest(root, &TestIgnorableShifted, "tscoll/cmsccoll/TestIgnorableShifted");*/ /* turned off for now, until I make a normal ordering */
addTest(root, &TestRuleOptions, "tscoll/cmsccoll/TestRuleOptions"); addTest(root, &TestRuleOptions, "tscoll/cmsccoll/TestRuleOptions");
addTest(root, &TestBeforePrefixFailure, "tscoll/cmsccoll/TestBeforePrefixFailure"); addTest(root, &TestBeforePrefixFailure, "tscoll/cmsccoll/TestBeforePrefixFailure");
addTest(root, &TestContractionClosure, "tscoll/cmsccoll/TestContractionClosure"); addTest(root, &TestContractionClosure, "tscoll/cmsccoll/TestContractionClosure");