mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 06:53:45 +00:00
ICU-474 make it to compile on HPUX 10.
X-SVN-Rev: 2218
This commit is contained in:
parent
d428c71452
commit
e9238b8f75
5 changed files with 55 additions and 11 deletions
|
@ -362,7 +362,11 @@ void CompoundTransliteratorTest::expect(const CompoundTransliterator& t,
|
|||
// Test handleTransliterate (incremental) transliteration --
|
||||
rsource.remove();
|
||||
rsource.append(source);
|
||||
UTransPosition index={0,source.length(),0,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart =0;
|
||||
index.contextLimit = source.length();
|
||||
index.start = 0;
|
||||
index.limit = source.length();
|
||||
t.handleTransliterate(rsource, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterate ", source + "->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
|
|
|
@ -250,13 +250,21 @@ void HangToJamoTransliteratorTest::expectTranslit(const HangulJamoTransliterator
|
|||
const UnicodeString& expectedResult){
|
||||
|
||||
|
||||
UTransPosition index={start, limit, cursor, limit};
|
||||
UTransPosition index;
|
||||
index.contextStart=start;
|
||||
index.contextLimit = limit;
|
||||
index.start = cursor;
|
||||
index.limit = limit;
|
||||
UnicodeString rsource(source);
|
||||
t.handleTransliterate(rsource, index, FALSE);
|
||||
expectAux(t.getID() + ":handleTransliterator(increment=FALSE) " + message, source + "-->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
UnicodeString rsource2(source);
|
||||
UTransPosition _index={start, limit, cursor, limit};
|
||||
UTransPosition _index;
|
||||
_index.contextStart= start;
|
||||
_index.contextLimit = limit;
|
||||
_index.start = cursor;
|
||||
_index.limit = limit;
|
||||
uprv_memcpy(&index, &_index, sizeof(index));
|
||||
t.handleTransliterate(rsource2, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterator(increment=TRUE) " + message, source + "-->" + rsource2, rsource2==expectedResult, expectedResult);
|
||||
|
@ -318,7 +326,11 @@ void HangToJamoTransliteratorTest::expect(const HangulJamoTransliterator& t,
|
|||
// Test handleTransliterate (incremental) transliteration --
|
||||
rsource.remove();
|
||||
rsource.append(source);
|
||||
UTransPosition index={0,source.length(),0,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart =0;
|
||||
index.contextLimit=source.length();
|
||||
index.start=0;
|
||||
index.limit=source.length();
|
||||
t.handleTransliterate(rsource, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterate " + message, source + "->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
|
|
|
@ -247,7 +247,11 @@ void HexToUniTransliteratorTest::TestSimpleTransliterate(){
|
|||
}
|
||||
UnicodeString source("He\\U+006C\\U+006C\\U+006F", "");
|
||||
UnicodeString rsource(source);
|
||||
UTransPosition index={1, source.length(),2,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart =1;
|
||||
index.contextLimit = source.length();
|
||||
index.start = 2;
|
||||
index.limit =source.length();
|
||||
UnicodeString expected("Hello");
|
||||
trans1->handleTransliterate(rsource, index, FALSE);
|
||||
expectAux(trans1->getID() + ":handleTransliterator ", source + "-->" + rsource, rsource==expected, expected);
|
||||
|
@ -299,7 +303,11 @@ void HexToUniTransliteratorTest::expectTranslit(const HexToUnicodeTransliterator
|
|||
const UnicodeString& expectedResult){
|
||||
|
||||
|
||||
UTransPosition _index={start, limit, cursor, limit};
|
||||
UTransPosition _index;
|
||||
_index.contextStart =start;
|
||||
_index.contextLimit = limit;
|
||||
_index.start = cursor;
|
||||
_index.limit = limit;
|
||||
UTransPosition index;
|
||||
uprv_memcpy(&index, &_index, sizeof(index));
|
||||
UnicodeString rsource(source);
|
||||
|
@ -399,7 +407,11 @@ void HexToUniTransliteratorTest::expect(const HexToUnicodeTransliterator& t,
|
|||
// Test handleTransliterate (incremental) transliteration --
|
||||
rsource.remove();
|
||||
rsource.append(source);
|
||||
UTransPosition index={0,source.length(),0,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart =0;
|
||||
index.contextLimit =source.length();
|
||||
index.start=0;
|
||||
index.limit = source.length();
|
||||
t.handleTransliterate(rsource, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterate " + message, source + "->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
|
|
|
@ -243,7 +243,11 @@ void JamoToHangTransliteratorTest::expectTranslit(const JamoHangulTransliterator
|
|||
const UnicodeString& expectedResult){
|
||||
|
||||
|
||||
UTransPosition _index = {start, limit, cursor, limit};
|
||||
UTransPosition _index;
|
||||
_index.contextStart= start;
|
||||
_index.contextLimit = limit;
|
||||
_index.start = cursor;
|
||||
_index.limit = limit;
|
||||
UTransPosition index;
|
||||
index = _index;
|
||||
UnicodeString rsource(source);
|
||||
|
@ -311,7 +315,11 @@ void JamoToHangTransliteratorTest::expect(const JamoHangulTransliterator& t,
|
|||
// Test handleTransliterate (incremental) transliteration --
|
||||
rsource.remove();
|
||||
rsource.append(source);
|
||||
UTransPosition index={0,source.length(),0,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart =0;
|
||||
index.contextLimit=source.length();
|
||||
index.start=0;
|
||||
index.limit=source.length();
|
||||
t.handleTransliterate(rsource, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterate " + message, source + "->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
|
|
|
@ -354,7 +354,11 @@ void UniToHexTransliteratorTest::expectTranslit(const UnicodeToHexTransliterator
|
|||
const UnicodeString& expectedResult){
|
||||
|
||||
|
||||
UTransPosition _index={start, limit, cursor, limit};
|
||||
UTransPosition _index;
|
||||
_index.contextStart=start;
|
||||
_index.contextLimit= limit;
|
||||
_index.start = cursor;
|
||||
_index.limit = limit;
|
||||
UTransPosition index = _index;
|
||||
UnicodeString rsource(source);
|
||||
t.handleTransliterate(rsource, index, FALSE);
|
||||
|
@ -454,7 +458,11 @@ void UniToHexTransliteratorTest::expect(const UnicodeToHexTransliterator& t,
|
|||
// Test handleTransliterate (incremental) transliteration --
|
||||
rsource.remove();
|
||||
rsource.append(source);
|
||||
UTransPosition index={0,source.length(),0,source.length()};
|
||||
UTransPosition index;
|
||||
index.contextStart=0;
|
||||
index.contextLimit = source.length();
|
||||
index.start =0;
|
||||
index.limit=source.length();
|
||||
t.handleTransliterate(rsource, index, TRUE);
|
||||
expectAux(t.getID() + ":handleTransliterate " + message, source + "->" + rsource, rsource==expectedResult, expectedResult);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue