/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6831794 6229811
* @summary Test EUC_TW charset
*/
public class TestEUC_TW {
static class Time {
long t;
}
throws Exception {
if (testDirect) {
} else {
}
for (int i = 0; i < iteration; i++) {
}
if (t != null)
}
return cc;
}
throws Exception {
if (testDirect) {
} else {
}
}
throws Exception {
if (testDirect) {
} else {
}
for (int i = 0; i < iteration; i++) {
}
if (t != null)
}
return bb;
}
throws Exception {
if (testDirect) {
} else {
}
}
//CharsetEncoder encOLD = Charset.forName("EUC_TW_OLD").newEncoder();
char[] cc = new char[0x20000];
char[] c2 = new char[2];
int pos = 0;
int i = 0;
//bmp
for (i = 0; i < 0x10000; i++) {
//SKIP these 3 NR codepoints if compared to EUC_TW
continue;
throw new RuntimeException("canEncode() err!");
}
}
}
//supp
for (i = 0x20000; i < 0x30000; i++) {
throw new RuntimeException("canEncode() err!");
}
//System.out.printf("cp=%x, (%x, %x) %n", i, c2[0] & 0xffff, c2[1] & 0xffff);
}
}
}
char[] cc = getEUC_TWChars(false);
}
}
}
cs.newDecoder();
cs.newEncoder();
}
char[] cc = getEUC_TWChars(true);
}
}
}
}
// The first byte is the length of malformed bytes
static byte[][] malformed = {
//{5, (byte)0xF8, (byte)0x80, (byte)0x80, (byte)0x9F, (byte)0x80, (byte)0xC0 },
};
boolean failed = false;
for (boolean direct: new boolean[] {false, true}) {
}
if (!cr.isMalformed()) {
failed = true;
failed = true;
}
}
}
if (failed)
}
if (direct) {
} else {
}
return false;
}
return true;
}
boolean failed = false;
//7f, a1a1, 8ea2a1a1, 8ea3a1a1, 8ea7a1a1
//0 1 2 3 7 11
int MAXOFF = 20;
int[][] Flows = {
//inpos, inLen, outPos, outLen, inPosEP, outposEP, under(0)/over(1)
//overflow
//underflow
};
for (boolean direct: new boolean[] {false, true}) {
failed = true;
}
}}}
if (failed)
}
// be the first one
//checkInit("EUC_TW_OLD");
checkInit("EUC_TW");
}
}