kerneltest/e32test/buffer/t_collate.cpp
branchRCL_3
changeset 44 3e88ff8f41d5
parent 43 c1f20ce4abcf
equal deleted inserted replaced
43:c1f20ce4abcf 44:3e88ff8f41d5
    98 		order = 1;
    98 		order = 1;
    99 
    99 
   100 	test(order == desired_order);
   100 	test(order == desired_order);
   101 	}
   101 	}
   102 
   102 
   103 #undef USE_SWEDISH_TABLE
       
   104 #ifdef USE_SWEDISH_TABLE
       
   105 static const TUint32 TheSwedishKey[] = 
   103 static const TUint32 TheSwedishKey[] = 
   106 	{
   104 	{
   107 	0x8f60109,0x8f70109,0x8f80109,0x8f60121,0x8f70121,0x8f80121,0x8dd0109,0x8dd0121,
   105 	0x8f60109,0x8f70109,0x8f80109,0x8f60121,0x8f70121,0x8f80121,0x8dd0109,0x8dd0121,
   108 	0x8c50121,0x8c50109,
   106 	0x8c50121,0x8c50109,
   109 	};
   107 	};
   128 static const TCollationKeyTable TheSwedishTable = 
   126 static const TCollationKeyTable TheSwedishTable = 
   129 	{ TheSwedishKey, TheSwedishIndex, 2, TheSwedishStringElement, TheSwedishStringIndex, 8 };
   127 	{ TheSwedishKey, TheSwedishIndex, 2, TheSwedishStringElement, TheSwedishStringIndex, 8 };
   130 
   128 
   131 static const TCollationMethod TheSwedishMethod =
   129 static const TCollationMethod TheSwedishMethod =
   132 	{ 0, NULL, &TheSwedishTable, 0 };
   130 	{ 0, NULL, &TheSwedishTable, 0 };
   133 #endif
       
   134 
   131 
   135 static const TCollationMethod TheSwapCaseMethod =
   132 static const TCollationMethod TheSwapCaseMethod =
   136 	{ 0, NULL, NULL, TCollationMethod::ESwapCase };
   133 	{ 0, NULL, NULL, TCollationMethod::ESwapCase };
   137 
   134 
   138 static const TUint32 TheKanaKey[] = 
   135 static const TUint32 TheKanaKey[] = 
 33138 	test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1);		// unaccented before accented...
 33135 	test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1);		// unaccented before accented...
 33139 	test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1,1);	// accents are significant at level 1
 33136 	test_unicode_collation(_L("Liege"),_L("Li\xe8ge"),-1,1);	// accents are significant at level 1
 33140 	test_unicode_collation(_L("Liege"),_L("li\xe8ge"),-1);		// accentuation outweighs case
 33137 	test_unicode_collation(_L("Liege"),_L("li\xe8ge"),-1);		// accentuation outweighs case
 33141 	test_unicode_collation(_L("Liege"),_L("li\xe8ge"),0,0);		// ignore accents and case at level 0
 33138 	test_unicode_collation(_L("Liege"),_L("li\xe8ge"),0,0);		// ignore accents and case at level 0
 33142 	test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),-1);	// a-ring before z by default
 33139 	test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),-1);	// a-ring before z by default
 33143 #undef USE_SWEDISH_TABLE
 33140 	// test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),1,3,&TheSwedishMethod);	// a-ring after z in Sweden
 33144 #ifdef USE_SWEDISH_TABLE
       
 33145 	test_unicode_collation(_L("\xe5ngstr\xf6m"),_L("zoo"),1,3,&TheSwedishMethod);	// a-ring after z in Sweden
       
 33146 #endif
       
 33147 	test_unicode_collation(_L("Antidisestablishmentarian"),_L("antidisestablishmentariac"),1); 	// long strings that don't have identical prefixes
 33141 	test_unicode_collation(_L("Antidisestablishmentarian"),_L("antidisestablishmentariac"),1); 	// long strings that don't have identical prefixes
 33148 	
 33142 	
 33149 	test_unicode_collation(_L("\xFF86"),_L(""),1);
 33143 	test_unicode_collation(_L("\xFF86"),_L(""),1);
 33150 	test_unicode_collation(_L("\x30B9"),_L(""),1);
 33144 	test_unicode_collation(_L("\x30B9"),_L(""),1);
 33151 	// Equality 
 33145 	// Equality