| 75 | |
---|
| 76 | private int[] vistaAddedCharCode_1 = { 0x7626 }; // 瘦 |
---|
| 77 | private int[] vistaAddedCharCode_2 = { 0x4ff1 }; // 俱 |
---|
| 78 | private int[] vistaAddedCharCode_3 = { 0x525d }; // 剝 |
---|
| 79 | private int[] vistaAddedCharCode_4 = { 0x541e }; // 吞 |
---|
| 80 | |
---|
| 81 | private String vistaAdded_1 = new String(vistaAddedCharCode_1, 0, 1); // 瘦 |
---|
| 82 | private String vistaAdded_2 = new String(vistaAddedCharCode_2, 0, 1); // 俱 |
---|
| 83 | private String vistaAdded_3 = new String(vistaAddedCharCode_3, 0, 1); // 剝 |
---|
| 84 | private String vistaAdded_4 = new String(vistaAddedCharCode_4, 0, 1); // 吞 |
---|
| 85 | |
---|
| 86 | private String vistaAddedStrings = vistaAdded_1 + vistaAdded_2 + vistaAdded_3 + vistaAdded_4; |
---|
| 87 | |
---|
| 88 | private int[] sPairCharCode_1 = { 0x2000B }; // 𠀋 : d840 と dc0b |
---|
| 89 | private int[] sPairCharCode_2 = { 0x2123D }; // 𡈽 : d844 と de3d |
---|
| 90 | private int[] sPairCharCode_3 = { 0x20B9F }; // 𠮟 : d842 と df9f |
---|
| 91 | |
---|
| 92 | private String sPair_1 = new String(sPairCharCode_1, 0, 1); // 𠀋 |
---|
| 93 | private String sPair_2 = new String(sPairCharCode_2, 0, 1); // 𡈽 |
---|
| 94 | private String sPair_3 = new String(sPairCharCode_3, 0, 1); // 𠮟 |
---|
| 95 | |
---|
| 96 | private String sPairStrings = sPair_1 + sPair_2 + sPair_3 + vistaAddedStrings; |
---|
| 97 | |
---|
| 98 | public void testToClassNameString_サロゲートペア_Win() throws Exception { |
---|
| 99 | String actual = ClassNameHelper.toClassName("hoge\\foo\\bar\\" + sPairStrings +"\\windows.js"); |
---|
| 100 | assertEquals("_hoge._foo._bar._" + sPairStrings + "._windows_js", actual); |
---|
| 101 | } |
---|
| 102 | |
---|
| 103 | public void testToClassNameString_サロゲートペア_UNIX() throws Exception { |
---|
| 104 | String actual = ClassNameHelper.toClassName("hoge/foo/bar/" + sPairStrings +"/unix.js"); |
---|
| 105 | assertEquals("_hoge._foo._bar._" + sPairStrings + "._unix_js", actual); |
---|
| 106 | } |
---|
| 107 | |
---|