mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 06:25:30 +00:00
ICU-8119 fixed, also fixed minor build/test issues.
X-SVN-Rev: 28997
This commit is contained in:
parent
a5bc9497c1
commit
871a56f64c
6 changed files with 58 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -498,6 +498,7 @@ icu4c/source/test/perf/convperf/debug
|
|||
icu4c/source/test/perf/convperf/release
|
||||
icu4c/source/test/perf/convperf/x64
|
||||
icu4c/source/test/perf/convperf/x86
|
||||
icu4c/source/test/perf/ipch
|
||||
icu4c/source/test/perf/normperf/*.d
|
||||
icu4c/source/test/perf/normperf/*.o
|
||||
icu4c/source/test/perf/normperf/*.vcxproj.user
|
||||
|
|
|
@ -111,11 +111,15 @@ UPerfFunction* DateFormatPerfTest::Collation100000(){
|
|||
int main(int argc, const char* argv[]){
|
||||
|
||||
// -x Filename.xml
|
||||
if(strcmp(argv[1],"-x") == 0)
|
||||
if((argc>1)&&(strcmp(argv[1],"-x") == 0))
|
||||
{
|
||||
if(argc < 3) return 0; // not enough arguments
|
||||
if(argc < 3) {
|
||||
fprintf(stderr, "Usage: %s -x <outfile>.xml\n", argv[0]);
|
||||
return 1;
|
||||
// not enough arguments
|
||||
}
|
||||
|
||||
cout << "ICU version - " << U_ICU_VERSION << endl;
|
||||
cout << "ICU version - " << U_ICU_VERSION << endl;
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
|
||||
// Declare functions
|
||||
|
|
|
@ -361,22 +361,42 @@ class CollationFunction : public UPerfFunction
|
|||
private:
|
||||
int num;
|
||||
char locale[25];
|
||||
UnicodeString *collation_strings;
|
||||
|
||||
/**
|
||||
* Unescape the strings
|
||||
*/
|
||||
void init() {
|
||||
uint32_t listSize = sizeof(collation_strings_escaped)/sizeof(collation_strings_escaped[0]);
|
||||
collation_strings = new UnicodeString[listSize];
|
||||
for(uint32_t k=0;k<listSize;k++) {
|
||||
collation_strings[k] = collation_strings_escaped[k].unescape();
|
||||
}
|
||||
UnicodeString shorty((UChar32)0x12345);
|
||||
}
|
||||
public:
|
||||
|
||||
CollationFunction()
|
||||
{
|
||||
num = -1;
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
~CollationFunction() {
|
||||
delete [] collation_strings;
|
||||
}
|
||||
|
||||
CollationFunction(int a, const char* loc)
|
||||
{
|
||||
num = a;
|
||||
strcpy(locale, loc);
|
||||
init();
|
||||
}
|
||||
|
||||
virtual void call(UErrorCode* status2)
|
||||
{
|
||||
uint32_t listSize = sizeof(collation_strings)/sizeof(collation_strings[0]);
|
||||
uint32_t listSize = sizeof(collation_strings_escaped)/sizeof(collation_strings_escaped[0]);
|
||||
UErrorCode status = U_ZERO_ERROR;
|
||||
Collator *coll = Collator::createInstance(Locale(locale), status);
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@
|
|||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)\</IntDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\x86\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(ProjectDir)\x86\$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)\</OutDir>
|
||||
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\x86\$(Configuration)\</OutDir>
|
||||
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)\</IntDir>
|
||||
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
|
@ -55,8 +55,7 @@
|
|||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>
|
||||
</DebugInformationFormat>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>icuucd.lib;icutud.lib;icutestd.lib;winmm.lib;icuucd.lib;icuind.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
|
@ -115,4 +114,4 @@
|
|||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
</Project>
|
|
@ -9,14 +9,18 @@
|
|||
|
||||
#include "unicode/ustring.h"
|
||||
|
||||
UnicodeString collation_strings [] = {
|
||||
/*
|
||||
* Processed through '[^\u0000-\u007f] Any-Hex/C' and then \u -> \\\u
|
||||
*/
|
||||
|
||||
UnicodeString collation_strings_escaped [] = {
|
||||
"Brenet, Nicolas-Guy",
|
||||
"Bresdin, Rodolphe",
|
||||
"Breton, André",
|
||||
"Breton, Andr\\u00E9",
|
||||
"Breton, Jules",
|
||||
"Brett, John",
|
||||
"Breu the Elder, Jörg",
|
||||
"Breu the Younger, Jörg",
|
||||
"Breu the Elder, J\\u00F6rg",
|
||||
"Breu the Younger, J\\u00F6rg",
|
||||
"Brewster Jr., John",
|
||||
"Brewster, Anna Richards",
|
||||
"Brewtnall, Edward Frederick",
|
||||
|
@ -134,7 +138,7 @@ UnicodeString collation_strings [] = {
|
|||
"Hall, Harry",
|
||||
"Hall, John",
|
||||
"Hall, Pam",
|
||||
"Hallé, Edward Charles",
|
||||
"Hall\\u00E9, Edward Charles",
|
||||
"Hallen, Ambrose",
|
||||
"Halley, Peter",
|
||||
"Halliday, Edward Irvine",
|
||||
|
@ -157,10 +161,10 @@ UnicodeString collation_strings [] = {
|
|||
"Meatyard, Ralph Eugene",
|
||||
"Meckenem, Israhel van",
|
||||
"Meegan, Tim",
|
||||
"Mehoffer, Józef",
|
||||
"Mehoffer, J\\u00F3zef",
|
||||
"Meidias Painter, The",
|
||||
"Meidner, Ludwig",
|
||||
"Meireles de Lima, Vítor",
|
||||
"Meireles de Lima, V\\u00EDtor",
|
||||
"Meissner, Leo J.",
|
||||
"Meissonier, Jean-Louis-Ernest",
|
||||
"Meistermann, Georg",
|
||||
|
@ -168,7 +172,7 @@ UnicodeString collation_strings [] = {
|
|||
"Melchers, Gari",
|
||||
"Meldrum, Max",
|
||||
"Meleager Painter, The",
|
||||
"Meléndez, Luis Egidio",
|
||||
"Mel\\u00E9ndez, Luis Egidio",
|
||||
"Mellan, Claude",
|
||||
"Mellery, Xavier",
|
||||
"Melli, Roberto",
|
||||
|
@ -196,16 +200,16 @@ UnicodeString collation_strings [] = {
|
|||
"Pei, I.M.",
|
||||
"Pelham, Peter",
|
||||
"Pellan, Alfred",
|
||||
"Pellegrin, Honoré",
|
||||
"Pellegrin, Honor\\u00E9",
|
||||
"Pellegrini, Domenico",
|
||||
"Pellegrini, Giovanni Antonio",
|
||||
"Pelouse, Léon-Germain",
|
||||
"Pelouse, L\\u00E9on-Germain",
|
||||
"Pels, Marsha",
|
||||
"Pemberton, Sophie",
|
||||
"Peña, Tonita",
|
||||
"Pe\\u00F1a, Tonita",
|
||||
"Penck, A.R.",
|
||||
"Pencz, Georg",
|
||||
"Pène du Bois, Guy",
|
||||
"P\\u00E8ne du Bois, Guy",
|
||||
"Penn, Irving",
|
||||
"Pennell, Joseph",
|
||||
"Rosso, Mino",
|
||||
|
@ -222,16 +226,16 @@ UnicodeString collation_strings [] = {
|
|||
"Rothstein, Arthur",
|
||||
"Rottenhammer, Hans",
|
||||
"Rouault, Georges",
|
||||
"Roubiliac, Louis-François",
|
||||
"Roubiliac, Louis-Fran\\u00E7ois",
|
||||
"Rouget, Georges",
|
||||
"Rousseau, Henri",
|
||||
"Rousseau, Théodore",
|
||||
"Rousseau, Th\\u00E9odore",
|
||||
"Roussel, Ker Xavier",
|
||||
"Roussel, Théodore",
|
||||
"Roussel, Th\\u00E9odore",
|
||||
"Rousselet, Gilles",
|
||||
"Roux, Ange-Joseph Antoine",
|
||||
"Roux, François Geoffroi",
|
||||
"Roux, François Joseph Frédéric",
|
||||
"Roux, Fran\\u00E7ois Geoffroi",
|
||||
"Roux, Fran\\u00E7ois Joseph Fr\\u00E9d\\u00E9ric",
|
||||
"Roux, Joseph",
|
||||
"Roux, Louis",
|
||||
"Roux, Mathieu Antoine",
|
||||
|
@ -245,7 +249,7 @@ UnicodeString collation_strings [] = {
|
|||
"Rubens, Pete Paul",
|
||||
"Rubin, Reuven",
|
||||
"Rublev, Andrei",
|
||||
"Rude, François",
|
||||
"Rude, Fran\\u00E7ois",
|
||||
"Rude, Olaf",
|
||||
"Ruelas, Julio",
|
||||
"Ruff, Thomas",
|
||||
|
@ -260,4 +264,5 @@ UnicodeString collation_strings [] = {
|
|||
"Schonfeld, Johann Heinrich",
|
||||
"Schongauer, Martin",
|
||||
"Schwieger, C. Robert"
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ucnvavailperf", "ucnvavailp
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DateFmtPerf", "DateFmtPerf\DateFmtPerf.vcxproj", "{B5E59422-0C52-4469-AB69-0C2AFD6E37A5}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dtfmtrtperf", "dtfmrtperf\dtfmtrtperf.vcproj", "{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
|
@ -134,12 +132,6 @@ Global
|
|||
{B5E59422-0C52-4469-AB69-0C2AFD6E37A5}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B5E59422-0C52-4469-AB69-0C2AFD6E37A5}.Release|Win32.Build.0 = Release|Win32
|
||||
{B5E59422-0C52-4469-AB69-0C2AFD6E37A5}.Release|x64.ActiveCfg = Release|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Debug|x64.ActiveCfg = Debug|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Release|Win32.Build.0 = Release|Win32
|
||||
{1FCAA83C-955C-4DEF-9CEF-3679AE75C44D}.Release|x64.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
Loading…
Add table
Reference in a new issue