-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add java test cases for WA GB18030 certification. #247
Conversation
|
||
public class CloudQueueClientGB18030Test extends QueueTestBase { | ||
|
||
public static final String GB18030CharSet = "啊齄丂狛狜隣郎隣兀﨩ˊ▇█〞〡¦℡㈱‐ー﹡﹢﹫、〓ⅰⅹ⒈€㈠㈩ⅠⅫ! ̄ぁんァヶΑ︴АЯаяāɡㄅㄩ─╋︵﹄︻︱︳︴ⅰⅹɑɡ〇〾⿻⺁䜣€㐀㒣㕴㕵㙉㙊䵯䵰䶴䶵"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Embedding Unicode characters directly in the source code can lead to problems if loaded on a system that doesn't assume UTF-8 by default. For example, if loaded using GB-18030 encoding. Consider leaving the string in a comment, but change the data to be constructed using the Unicode UTF-16 codepoints:
String GB18030CharSet = new String(new char[] { 0x554A, 0x9F44, 0x4E02, 0x72DB, 0x72DC, 0xF9F1, 0xF92C, 0xF9F1,
0xFA0C, 0xFA29, 0x02CA, 0x2587, 0x2588, 0x301E, 0x3021, 0xFFE4, 0x2121, 0x3231, 0x2010, 0x30FC, 0xFE61,
0xFE62, 0xFE6B, 0x3001, 0x3013, 0x2170, 0x2179, 0x2488, 0x20AC, 0x3220, 0x3229, 0x2160, 0x216B, 0xFF01,
0xFFE3, 0x3041, 0x3093, 0x30A1, 0x30F6, 0x0391, 0xFE34, 0x0410, 0x042F, 0x0430, 0x044F, 0x0101, 0x0261,
0x3105, 0x3129, 0x2500, 0x254B, 0xFE35, 0xFE44, 0xFE3B, 0xFE31, 0xFE33, 0xFE34, 0x2170, 0x2179, 0x0251,
0xE7C7, 0x0261, 0x3007, 0x303E, 0x2FFB, 0x2E81, 0xE843, 0x4723, 0xE864, 0x20AC, 0x3400, 0x34A3, 0x3574,
0x3575, 0x3649, 0x364A, 0x4D6F, 0x4D70, 0x4DB4, 0x4DB5, });
I would also suggest using multiple strings, one for each of the important character sets:
String Chinese_2B_1 = new String(new char[] { 0x2488, 0x2460, 0x216B, 0x3128, 0x3129 });
String Chinese_2B_2 = new String(new char[] { 0x554A, 0x963F, 0x9F3E, 0x9F44 });
String Chinese_2B_3 = new String(new char[] { 0x4E02, 0x4E04, 0x72DA, 0x72DB });
String Chinese_2B_4 = new String(new char[] { 0x72DC, 0x72DD, 0xFA28, 0xFA29 });
String Chinese_2B_5 = new String(new char[] { 0x02CA, 0x02CB, 0x02D9, 0x2013, 0xE7F3, 0x3007 });
String Chinese_4B_ExtA = new String(new char[] { 0x3400, 0x3401, 0x4DB4, 0x4DB5 });
String Chinese_ExtB = new String(new char[] { 0xD840, 0xDC00, 0xD840, 0xDC01, 0xD869, 0xDED5, 0xD869, 0xDED6 });
String Minority_Languages_Dehong_Dai = new String(new char[] { 0x1958, 0x1963, 0x196D, 0x1970, 0x0020, 0x1956,
0x196D, 0x1970, 0x0020, 0x1956, 0x196C, 0x1972, 0x1951, 0x1968, 0x1952, 0x1970 });
String Minority_Languages_Mongolian = new String(new char[] { 0x182E, 0x1823, 0x1829, 0x182D, 0x1823, 0x182F,
0x0020, 0x0020, 0x1826, 0x1830, 0x1826, 0x182D, 0x003B, 0x0020, 0x17F8, 0x17F9, 0x0020, 0x188E, 0x188F,
0x1890, 0x1891, 0x1892, 0x1893, 0x1894, 0x1895, 0x1896, 0x1897 });
String Minority_Languages_Mongolian2 = new String(new char[] { 0x1823, 0x183A, 0x1835, 0x1821, 0x1835, 0x183A,
0x1830, 0x0020, 0x182C, 0x1835, 0x1820, 0x182C, 0x1833, 0x1830, 0x1823, 0x182C, 0x1821, 0x1835, 0x182C,
0x0020, 0x182C, 0x1835, 0x183A, 0x1820, 0x182C, 0x1833, 0x1830, 0x0020, 0x183A, 0x182C, 0x1823, 0x0020,
0x1820 });
String Minority_Languages_Tibetan = new String(new char[] { 0x0F56, 0x0F7C, 0x0F51, 0x0F0B, 0x0F61, 0x0F72,
0x0F42, 0x0020, 0x0020, 0x0020, 0x0F00, 0x0F01, 0x0F02, 0x0F03, 0x0F04, 0x0F05, 0x0FA2, 0x0FA3, 0x0FA4,
0x0FA5 });
String Minority_Languages_Tibetan2 = new String(new char[] { 0x0F51, 0x0F56, 0x0FB1, 0x0F44, 0x0F66, 0x0F0B,
0x0F45, 0x0F53, 0x0F0B, 0x0F66, 0x0F92, 0x0FB2, 0x0F7C, 0x0F63, 0x0F0B, 0x0F51, 0x0F40, 0x0F62, 0x0F0D,
0x0020, 0x0F56, 0x0F40, 0x0FB2, 0x0F0B, 0x0F64, 0x0F72, 0x0F66, 0x0F0B, 0x0F62, 0x0F92, 0x0FB1, 0x0F63,
0x0F0D });
String Minority_Languages_Uyghur = new String(new char[] { 0x0626, 0x06C7, 0x064A, 0x063A, 0x06C7, 0x0631,
0x0020, 0x062A, 0x0649, 0x0644, 0x0649, 0x0020, 0x0020, 0x0020, 0x003B, 0x060B, 0x0020, 0x060C, 0x0020,
0x060D, 0x0020, 0x060E, 0x0020, 0x060F, 0x0610, 0x0020, 0x0020, 0x0020, 0xFEF2, 0x0020, 0xFEF3, 0x0020,
0xFEF4, 0x0020, 0xFEF5, 0x0020, 0xFEF6, 0x0020, 0xFEF7, 0x0020, 0xFEF8, 0x0020, 0xFEF9, 0x0020, 0xFEFA,
0x0020, 0xFEFB });
String Minority_Languages_Uyghur2 = new String(new char[] { 0x06CB, 0x06D0, 0x06AD, 0x0643, 0x0642, 0x0642,
0x0020, 0x06BE, 0x0633, 0x0020, 0x0642, 0x0643, 0x0020, 0x0643, 0x062F, 0x0633, 0x062F, 0x0642, 0x0020,
0x062F });
String Minority_Languages_Xishuangbanna_Dai = new String(new char[] { 0x198E, 0x19B7, 0x1991, 0x19BA, 0x1996,
0x19BA, 0x19C8, 0x1989, 0x19B2, 0x19C7, 0x1989, 0x19B8, 0x19C2, 0x1997, 0x19C3, 0x1993, 0x19B1 });
String Minority_Languages_Yi = new String(new char[] { 0xA188, 0xA320, 0xA071, 0xA0B7, 0x003B, 0xA000, 0xA001,
0xA002, 0xA003, 0xA004, 0xA005, 0xA006, 0xA4C1, 0xA4C2, 0xA4C3, 0xA4C4, 0xA4C5, 0xA4C6 });
String Minority_Languages_Yi2 = new String(new char[] { 0xA26C, 0xA112, 0xA435, 0xA113, 0xA428, 0xA435, 0xA113,
0xA428 });
2. Change GB18030CharSet to be constructed using the Unicode UTF-16 codepoints.
Add java test cases for WA GB18030 certification.
Add java test cases for WA GB18030 certification.
This test was broken by the change to set fixed length streaming. The fix is to use a different technique to induce failure.
Make OperationStatus immutable
…#247) * Adding Indexers UT of changing batch size and max failed items - task 1487 * moving client init to beforeTest method
Add 2 java test cases for WA GB18030 certification.