mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-15 01:42:37 +00:00
ICU-915 Tests for bug fix
X-SVN-Rev: 4399
This commit is contained in:
parent
d0c968260e
commit
57c9dec10f
2 changed files with 19 additions and 18 deletions
|
@ -1370,12 +1370,12 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
const uint8_t to_iso_2022_cn[]={
|
||||
0x0F, 0x41,
|
||||
0x0f, 0x25, 0x55, 0x33, 0x37, 0x31, 0x32,
|
||||
0x0F, 0x42,
|
||||
0x42,
|
||||
};
|
||||
int32_t from_iso_2022_cnOffs [] ={
|
||||
0,0,
|
||||
1,1,1,1,1,1,1,
|
||||
2,2,
|
||||
2,
|
||||
};
|
||||
UChar iso_2022_cn_inputText1[]={ 0x4e00, 0x3712, 0x4e01, };
|
||||
const uint8_t to_iso_2022_cn1[]={
|
||||
|
@ -1420,7 +1420,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x22,
|
||||
0x0f, 0x25, 0x55, 0x44, 0x38, 0x34, 0x44,
|
||||
0x25, 0x55, 0x44, 0x43, 0x35, 0x36,
|
||||
0x0f, 0x42,
|
||||
0x42,
|
||||
};
|
||||
int32_t from_iso_2022_cnOffs4 [] ={
|
||||
0,0,0,0,0,0,0,
|
||||
|
@ -1429,7 +1429,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
3,3,3,3,3,3,3,
|
||||
4,4,4,4,4,4,4,
|
||||
4,4,4,4,4,4,
|
||||
6, 6
|
||||
6
|
||||
|
||||
};
|
||||
|
||||
|
@ -1621,7 +1621,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x22,
|
||||
0x0f, 0x5c, 0x75, 0x44, 0x38, 0x34, 0x44,
|
||||
0x5c, 0x75, 0x44, 0x43, 0x35, 0x36,
|
||||
0x0f, 0x42,
|
||||
0x42,
|
||||
};
|
||||
int32_t from_iso_2022_cnOffs4_v2 [] ={
|
||||
0,0,0,0,0,0,0,
|
||||
|
@ -1630,7 +1630,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
3,3,3,3,3,3,3,
|
||||
4,4,4,4,4,4,4,
|
||||
4,4,4,4,4,4,
|
||||
6, 6
|
||||
6,
|
||||
|
||||
};
|
||||
if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText4, sizeof(iso_2022_cn_inputText4)/sizeof(iso_2022_cn_inputText4[0]),
|
||||
|
@ -1645,7 +1645,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
0x0f, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36,
|
||||
0x1b, 0x24, 0x29, 0x41, 0x0e, 0x21, 0x22,
|
||||
0x0f, 0x5c, 0x75, 0x30, 0x30, 0x30, 0x32, 0x33, 0x34, 0x35, 0x36,
|
||||
0x0f, 0x42
|
||||
0x42
|
||||
};
|
||||
|
||||
|
||||
|
@ -1656,7 +1656,7 @@ static void TestSubWithValue(int32_t inputsize, int32_t outputsize)
|
|||
3,3,3,3,3,3,3,
|
||||
4,4,4,4,4,4,4,4,4,4,4,
|
||||
|
||||
6,6
|
||||
6
|
||||
|
||||
};
|
||||
if(!testConvertFromUnicodeWithContext(iso_2022_cn_inputText4, sizeof(iso_2022_cn_inputText4)/sizeof(iso_2022_cn_inputText4[0]),
|
||||
|
|
|
@ -185,17 +185,18 @@ static void TestSurrogateBehaviour(){
|
|||
const uint8_t expected[] = {
|
||||
0x1B, 0x24, 0x29, 0x41, 0x0E, 0x52, 0x3B,
|
||||
0x36, 0x21,
|
||||
0x1B, 0x24, 0x29, 0x47, 0x1B, 0x4E, 0x24, 0x22,
|
||||
0x0f, 0x1A,
|
||||
0x0F, 0x31,
|
||||
0x1A,
|
||||
0x0f, 0x32
|
||||
};
|
||||
|
||||
|
||||
|
||||
int32_t offsets[] = {
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1,
|
||||
2, 2, 2, 2, 2, 2, 2, 2,
|
||||
3, 3,
|
||||
2, 2,
|
||||
3,
|
||||
5, 5, };
|
||||
|
||||
/*iso-2022-CN*/
|
||||
|
@ -468,8 +469,8 @@ static void TestErrorBehaviour(){
|
|||
int32_t offsets[] = { 0x00, 0x00};
|
||||
|
||||
UChar sampleText2[] = { 0x0031, 0xd801, 0x0032};
|
||||
const uint8_t expected2[] = { 0x0f, 0x31, 0x1A,0x0f,0x32};
|
||||
int32_t offsets2[] = { 0x00, 0x00, 0x01,0x02,0x02};
|
||||
const uint8_t expected2[] = { 0x0f, 0x31, 0x1A,0x32};
|
||||
int32_t offsets2[] = { 0x00, 0x00, 0x01,0x02};
|
||||
|
||||
UChar sampleText3MBCS[] = { 0x0051, 0x0050, 0xdc01};
|
||||
const uint8_t expected3MBCS[] = {0x0f, 0x51, 0x50, 0x1A};
|
||||
|
@ -1660,8 +1661,8 @@ static void TestResetBehaviour(void){
|
|||
const uint8_t expected[] = {
|
||||
0x1B, 0x24, 0x29, 0x41, 0x0E, 0x52, 0x3B,
|
||||
0x36, 0x21,
|
||||
0x1B, 0x24, 0x29, 0x47, 0x1B, 0x4E, 0x24, 0x22,
|
||||
0x0f, 0x1A,
|
||||
0x0f, 0x31,
|
||||
0x1A,
|
||||
0x0f, 0x32
|
||||
};
|
||||
|
||||
|
@ -1669,8 +1670,8 @@ static void TestResetBehaviour(void){
|
|||
int32_t offsets[] = {
|
||||
0, 0, 0, 0, 0, 0, 0,
|
||||
1, 1,
|
||||
2, 2, 2, 2, 2, 2, 2, 2,
|
||||
3, 3,
|
||||
2, 2,
|
||||
3,
|
||||
5, 5, };
|
||||
|
||||
UChar sampleText1[] = {0x4e00, 0x04e01, 0x0031,0x001A, 0x0032};
|
||||
|
|
Loading…
Add table
Reference in a new issue