diff --git a/icu4c/source/test/cintltst/nccbtst.c b/icu4c/source/test/cintltst/nccbtst.c index f4e3c37d71..c67322bdd4 100644 --- a/icu4c/source/test/cintltst/nccbtst.c +++ b/icu4c/source/test/cintltst/nccbtst.c @@ -1,6 +1,6 @@ /******************************************************************** * COPYRIGHT: - * Copyright (c) 1997-2011, International Business Machines Corporation and + * Copyright (c) 1997-2012, International Business Machines Corporation and * others. All Rights Reserved. ********************************************************************/ /* @@ -765,8 +765,8 @@ static void TestSkip(int32_t inputsize, int32_t outputsize) /*iso-2022-jp*/ static const uint8_t sampleTxt_iso_2022_jp[]={ 0x41, - 0x1b, 0x24, 0x42, 0x2A, 0x44, /*unassigned*/ - 0x1b, 0x28, 0x42, 0x42, + 0x1b, 0x24, 0x42, 0x3a, 0x1a, /*unassigned*/ + 0x1b, 0x28, 0x42, 0x42, }; static const UChar iso_2022_jptoUnicode[]={ 0x41,0x42 }; @@ -2314,13 +2314,14 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) /*iso-2022-jp*/ static const uint8_t sampleTxt_iso_2022_jp[]={ 0x1b, 0x28, 0x42, 0x41, - 0x1b, 0x24, 0x42, 0x2A, 0x44, /*unassigned*/ + 0x1b, 0x24, 0x42, 0x3a, 0x1a, /*unassigned*/ 0x1b, 0x28, 0x42, 0x42, }; - static const UChar iso_2022_jptoUnicode[]={ 0x41,0x25,0x58,0x32,0x41,0x25,0x58,0x34,0x34, 0x42 }; + /* A % X 3 A % X 1 A B */ + static const UChar iso_2022_jptoUnicode[]={ 0x41,0x25,0x58,0x33,0x41,0x25,0x58,0x31,0x41, 0x42 }; static const int32_t from_iso_2022_jpOffs [] ={ 3, 7, 7, 7, 7, 7, 7, 7, 7, 12 }; - + /*iso-2022-cn*/ static const uint8_t sampleTxt_iso_2022_cn[]={ 0x0f, 0x41, 0x44, @@ -2457,8 +2458,9 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) { static const UChar iso_2022_jptoUnicodeDec[]={ 0x0041, - 0x0026, 0x0023, 0x0034, 0x0032, 0x003b, - 0x0026, 0x0023, 0x0036, 0x0038, 0x003b, + /* & # 5 8 ; */ + 0x0026, 0x0023, 0x0035, 0x0038, 0x003b, + 0x0026, 0x0023, 0x0032, 0x0036, 0x003b, 0x0042 }; static const int32_t from_iso_2022_jpOffsDec [] ={ 3,7,7,7,7,7,7,7,7,7,7,12, }; if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp), @@ -2469,8 +2471,9 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) { static const UChar iso_2022_jptoUnicodeHex[]={ 0x0041, - 0x0026, 0x0023, 0x0078, 0x0032, 0x0041, 0x003b, - 0x0026, 0x0023, 0x0078, 0x0034, 0x0034, 0x003b, + /* & # x 3 A ; */ + 0x0026, 0x0023, 0x0078, 0x0033, 0x0041, 0x003b, + 0x0026, 0x0023, 0x0078, 0x0031, 0x0041, 0x003b, 0x0042 }; static const int32_t from_iso_2022_jpOffsHex [] ={ 3,7,7,7,7,7,7,7,7,7,7,7,7,12 }; if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp), @@ -2481,8 +2484,8 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize) { static const UChar iso_2022_jptoUnicodeC[]={ 0x0041, - 0x005C, 0x0078, 0x0032, 0x0041, - 0x005C, 0x0078, 0x0034, 0x0034, + 0x005C, 0x0078, 0x0033, 0x0041, /* \x3A */ + 0x005C, 0x0078, 0x0031, 0x0041, /* \x1A */ 0x0042 }; int32_t from_iso_2022_jpOffsC [] ={ 3,7,7,7,7,7,7,7,7,12 }; if(!testConvertToUnicodeWithContext(sampleTxt_iso_2022_jp, sizeof(sampleTxt_iso_2022_jp),