jdk/test/java/beans/XMLEncoder/Test4625418.java
author ohair
Tue, 25 May 2010 15:58:33 -0700
changeset 5506 202f599c92aa
parent 2 90ce3da70b43
child 38401 5a0c6a730a64
permissions -rw-r--r--
6943119: Rebrand source copyright notices Reviewed-by: darcy, weijun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     1
/*
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
     2
 * Copyright (c) 2006, 2007, Oracle and/or its affiliates. All rights reserved.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     4
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
90ce3da70b43 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
90ce3da70b43 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
90ce3da70b43 Initial load
duke
parents:
diff changeset
     8
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
90ce3da70b43 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
90ce3da70b43 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
90ce3da70b43 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
90ce3da70b43 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
90ce3da70b43 Initial load
duke
parents:
diff changeset
    14
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
90ce3da70b43 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
90ce3da70b43 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
90ce3da70b43 Initial load
duke
parents:
diff changeset
    18
 *
5506
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
202f599c92aa 6943119: Rebrand source copyright notices
ohair
parents: 2
diff changeset
    21
 * questions.
2
90ce3da70b43 Initial load
duke
parents:
diff changeset
    22
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
    23
90ce3da70b43 Initial load
duke
parents:
diff changeset
    24
/*
90ce3da70b43 Initial load
duke
parents:
diff changeset
    25
 * @test
90ce3da70b43 Initial load
duke
parents:
diff changeset
    26
 * @bug 4625418
90ce3da70b43 Initial load
duke
parents:
diff changeset
    27
 * @summary Tests XML <a href="http://download.java.net/jdk6/docs/technotes/guides/intl/encoding.doc.html">encoding</a>
90ce3da70b43 Initial load
duke
parents:
diff changeset
    28
 * @author Sergey Malenkov
90ce3da70b43 Initial load
duke
parents:
diff changeset
    29
 *
90ce3da70b43 Initial load
duke
parents:
diff changeset
    30
 * @run main Test4625418 ASCII
90ce3da70b43 Initial load
duke
parents:
diff changeset
    31
 * @run main Test4625418 Big5
90ce3da70b43 Initial load
duke
parents:
diff changeset
    32
 * ?run main Test4625418 Big5-HKSCS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    33
 * ?run main Test4625418 Big5_HKSCS
90ce3da70b43 Initial load
duke
parents:
diff changeset
    34
 * @run main Test4625418 Big5_Solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
    35
 * ?run main Test4625418 Cp037
90ce3da70b43 Initial load
duke
parents:
diff changeset
    36
 * @run main Test4625418 Cp1006
90ce3da70b43 Initial load
duke
parents:
diff changeset
    37
 * ?run main Test4625418 Cp1025
90ce3da70b43 Initial load
duke
parents:
diff changeset
    38
 * -run main Test4625418 Cp1026
90ce3da70b43 Initial load
duke
parents:
diff changeset
    39
 * @run main Test4625418 Cp1046
90ce3da70b43 Initial load
duke
parents:
diff changeset
    40
 * @run main Test4625418 Cp1047
90ce3da70b43 Initial load
duke
parents:
diff changeset
    41
 * @run main Test4625418 Cp1097
90ce3da70b43 Initial load
duke
parents:
diff changeset
    42
 * @run main Test4625418 Cp1098
90ce3da70b43 Initial load
duke
parents:
diff changeset
    43
 * ?run main Test4625418 Cp1112
90ce3da70b43 Initial load
duke
parents:
diff changeset
    44
 * ?run main Test4625418 Cp1122
90ce3da70b43 Initial load
duke
parents:
diff changeset
    45
 * ?run main Test4625418 Cp1123
90ce3da70b43 Initial load
duke
parents:
diff changeset
    46
 * @run main Test4625418 Cp1124
90ce3da70b43 Initial load
duke
parents:
diff changeset
    47
 * ?run main Test4625418 Cp1140
90ce3da70b43 Initial load
duke
parents:
diff changeset
    48
 * ?run main Test4625418 Cp1141
90ce3da70b43 Initial load
duke
parents:
diff changeset
    49
 * ?run main Test4625418 Cp1142
90ce3da70b43 Initial load
duke
parents:
diff changeset
    50
 * ?run main Test4625418 Cp1143
90ce3da70b43 Initial load
duke
parents:
diff changeset
    51
 * ?run main Test4625418 Cp1144
90ce3da70b43 Initial load
duke
parents:
diff changeset
    52
 * ?run main Test4625418 Cp1145
90ce3da70b43 Initial load
duke
parents:
diff changeset
    53
 * ?run main Test4625418 Cp1146
90ce3da70b43 Initial load
duke
parents:
diff changeset
    54
 * ?run main Test4625418 Cp1147
90ce3da70b43 Initial load
duke
parents:
diff changeset
    55
 * ?run main Test4625418 Cp1148
90ce3da70b43 Initial load
duke
parents:
diff changeset
    56
 * ?run main Test4625418 Cp1149
90ce3da70b43 Initial load
duke
parents:
diff changeset
    57
 * @run main Test4625418 Cp1250
90ce3da70b43 Initial load
duke
parents:
diff changeset
    58
 * @run main Test4625418 Cp1251
90ce3da70b43 Initial load
duke
parents:
diff changeset
    59
 * @run main Test4625418 Cp1252
90ce3da70b43 Initial load
duke
parents:
diff changeset
    60
 * @run main Test4625418 Cp1253
90ce3da70b43 Initial load
duke
parents:
diff changeset
    61
 * @run main Test4625418 Cp1254
90ce3da70b43 Initial load
duke
parents:
diff changeset
    62
 * @run main Test4625418 Cp1255
90ce3da70b43 Initial load
duke
parents:
diff changeset
    63
 * @run main Test4625418 Cp1256
90ce3da70b43 Initial load
duke
parents:
diff changeset
    64
 * @run main Test4625418 Cp1257
90ce3da70b43 Initial load
duke
parents:
diff changeset
    65
 * @run main Test4625418 Cp1258
90ce3da70b43 Initial load
duke
parents:
diff changeset
    66
 * ?run main Test4625418 Cp1381
90ce3da70b43 Initial load
duke
parents:
diff changeset
    67
 * ?run main Test4625418 Cp1383
90ce3da70b43 Initial load
duke
parents:
diff changeset
    68
 * ?run main Test4625418 Cp273
90ce3da70b43 Initial load
duke
parents:
diff changeset
    69
 * ?run main Test4625418 Cp277
90ce3da70b43 Initial load
duke
parents:
diff changeset
    70
 * ?run main Test4625418 Cp278
90ce3da70b43 Initial load
duke
parents:
diff changeset
    71
 * ?run main Test4625418 Cp280
90ce3da70b43 Initial load
duke
parents:
diff changeset
    72
 * ?run main Test4625418 Cp284
90ce3da70b43 Initial load
duke
parents:
diff changeset
    73
 * ?run main Test4625418 Cp285
90ce3da70b43 Initial load
duke
parents:
diff changeset
    74
 * ?run main Test4625418 Cp297
90ce3da70b43 Initial load
duke
parents:
diff changeset
    75
 * ?run main Test4625418 Cp33722
90ce3da70b43 Initial load
duke
parents:
diff changeset
    76
 * ?run main Test4625418 Cp420
90ce3da70b43 Initial load
duke
parents:
diff changeset
    77
 * ?run main Test4625418 Cp424
90ce3da70b43 Initial load
duke
parents:
diff changeset
    78
 * @run main Test4625418 Cp437
90ce3da70b43 Initial load
duke
parents:
diff changeset
    79
 * ?run main Test4625418 Cp500
90ce3da70b43 Initial load
duke
parents:
diff changeset
    80
 * ?run main Test4625418 Cp50220
90ce3da70b43 Initial load
duke
parents:
diff changeset
    81
 * ?run main Test4625418 Cp50221
90ce3da70b43 Initial load
duke
parents:
diff changeset
    82
 * @run main Test4625418 Cp737
90ce3da70b43 Initial load
duke
parents:
diff changeset
    83
 * @run main Test4625418 Cp775
90ce3da70b43 Initial load
duke
parents:
diff changeset
    84
 * -run main Test4625418 Cp834
90ce3da70b43 Initial load
duke
parents:
diff changeset
    85
 * ?run main Test4625418 Cp838
90ce3da70b43 Initial load
duke
parents:
diff changeset
    86
 * @run main Test4625418 Cp850
90ce3da70b43 Initial load
duke
parents:
diff changeset
    87
 * @run main Test4625418 Cp852
90ce3da70b43 Initial load
duke
parents:
diff changeset
    88
 * @run main Test4625418 Cp855
90ce3da70b43 Initial load
duke
parents:
diff changeset
    89
 * @run main Test4625418 Cp856
90ce3da70b43 Initial load
duke
parents:
diff changeset
    90
 * @run main Test4625418 Cp857
90ce3da70b43 Initial load
duke
parents:
diff changeset
    91
 * @run main Test4625418 Cp858
90ce3da70b43 Initial load
duke
parents:
diff changeset
    92
 * @run main Test4625418 Cp860
90ce3da70b43 Initial load
duke
parents:
diff changeset
    93
 * @run main Test4625418 Cp861
90ce3da70b43 Initial load
duke
parents:
diff changeset
    94
 * @run main Test4625418 Cp862
90ce3da70b43 Initial load
duke
parents:
diff changeset
    95
 * @run main Test4625418 Cp863
90ce3da70b43 Initial load
duke
parents:
diff changeset
    96
 * @run main Test4625418 Cp864
90ce3da70b43 Initial load
duke
parents:
diff changeset
    97
 * @run main Test4625418 Cp865
90ce3da70b43 Initial load
duke
parents:
diff changeset
    98
 * @run main Test4625418 Cp866
90ce3da70b43 Initial load
duke
parents:
diff changeset
    99
 * @run main Test4625418 Cp868
90ce3da70b43 Initial load
duke
parents:
diff changeset
   100
 * @run main Test4625418 Cp869
90ce3da70b43 Initial load
duke
parents:
diff changeset
   101
 * ?run main Test4625418 Cp870
90ce3da70b43 Initial load
duke
parents:
diff changeset
   102
 * ?run main Test4625418 Cp871
90ce3da70b43 Initial load
duke
parents:
diff changeset
   103
 * @run main Test4625418 Cp874
90ce3da70b43 Initial load
duke
parents:
diff changeset
   104
 * ?run main Test4625418 Cp875
90ce3da70b43 Initial load
duke
parents:
diff changeset
   105
 * ?run main Test4625418 Cp918
90ce3da70b43 Initial load
duke
parents:
diff changeset
   106
 * @run main Test4625418 Cp921
90ce3da70b43 Initial load
duke
parents:
diff changeset
   107
 * @run main Test4625418 Cp922
90ce3da70b43 Initial load
duke
parents:
diff changeset
   108
 * -run main Test4625418 Cp930
90ce3da70b43 Initial load
duke
parents:
diff changeset
   109
 * @run main Test4625418 Cp933
90ce3da70b43 Initial load
duke
parents:
diff changeset
   110
 * ?run main Test4625418 Cp935
90ce3da70b43 Initial load
duke
parents:
diff changeset
   111
 * ?run main Test4625418 Cp937
90ce3da70b43 Initial load
duke
parents:
diff changeset
   112
 * ?run main Test4625418 Cp939
90ce3da70b43 Initial load
duke
parents:
diff changeset
   113
 * ?run main Test4625418 Cp942
90ce3da70b43 Initial load
duke
parents:
diff changeset
   114
 * ?run main Test4625418 Cp942C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   115
 * @run main Test4625418 Cp943
90ce3da70b43 Initial load
duke
parents:
diff changeset
   116
 * ?run main Test4625418 Cp943C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   117
 * @run main Test4625418 Cp948
90ce3da70b43 Initial load
duke
parents:
diff changeset
   118
 * @run main Test4625418 Cp949
90ce3da70b43 Initial load
duke
parents:
diff changeset
   119
 * ?run main Test4625418 Cp949C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   120
 * @run main Test4625418 Cp950
90ce3da70b43 Initial load
duke
parents:
diff changeset
   121
 * @run main Test4625418 Cp964
90ce3da70b43 Initial load
duke
parents:
diff changeset
   122
 * ?run main Test4625418 Cp970
90ce3da70b43 Initial load
duke
parents:
diff changeset
   123
 * ?run main Test4625418 EUC-JP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   124
 * @run main Test4625418 EUC-KR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   125
 * @run main Test4625418 EUC_CN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   126
 * ?run main Test4625418 EUC_JP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   127
 * ?run main Test4625418 EUC_JP_LINUX
90ce3da70b43 Initial load
duke
parents:
diff changeset
   128
 * ?run main Test4625418 EUC_JP_Solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   129
 * @run main Test4625418 EUC_KR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   130
 * ?run main Test4625418 EUC_TW
90ce3da70b43 Initial load
duke
parents:
diff changeset
   131
 * @run main Test4625418 GB18030
90ce3da70b43 Initial load
duke
parents:
diff changeset
   132
 * @run main Test4625418 GB2312
90ce3da70b43 Initial load
duke
parents:
diff changeset
   133
 * @run main Test4625418 GBK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   134
 * ?run main Test4625418 IBM-Thai
90ce3da70b43 Initial load
duke
parents:
diff changeset
   135
 * @run main Test4625418 IBM00858
90ce3da70b43 Initial load
duke
parents:
diff changeset
   136
 * ?run main Test4625418 IBM01140
90ce3da70b43 Initial load
duke
parents:
diff changeset
   137
 * ?run main Test4625418 IBM01141
90ce3da70b43 Initial load
duke
parents:
diff changeset
   138
 * ?run main Test4625418 IBM01142
90ce3da70b43 Initial load
duke
parents:
diff changeset
   139
 * ?run main Test4625418 IBM01143
90ce3da70b43 Initial load
duke
parents:
diff changeset
   140
 * ?run main Test4625418 IBM01144
90ce3da70b43 Initial load
duke
parents:
diff changeset
   141
 * ?run main Test4625418 IBM01145
90ce3da70b43 Initial load
duke
parents:
diff changeset
   142
 * ?run main Test4625418 IBM01146
90ce3da70b43 Initial load
duke
parents:
diff changeset
   143
 * ?run main Test4625418 IBM01147
90ce3da70b43 Initial load
duke
parents:
diff changeset
   144
 * ?run main Test4625418 IBM01148
90ce3da70b43 Initial load
duke
parents:
diff changeset
   145
 * ?run main Test4625418 IBM01149
90ce3da70b43 Initial load
duke
parents:
diff changeset
   146
 * ?run main Test4625418 IBM037
90ce3da70b43 Initial load
duke
parents:
diff changeset
   147
 * -run main Test4625418 IBM1026
90ce3da70b43 Initial load
duke
parents:
diff changeset
   148
 * @run main Test4625418 IBM1047
90ce3da70b43 Initial load
duke
parents:
diff changeset
   149
 * ?run main Test4625418 IBM273
90ce3da70b43 Initial load
duke
parents:
diff changeset
   150
 * ?run main Test4625418 IBM277
90ce3da70b43 Initial load
duke
parents:
diff changeset
   151
 * ?run main Test4625418 IBM278
90ce3da70b43 Initial load
duke
parents:
diff changeset
   152
 * ?run main Test4625418 IBM280
90ce3da70b43 Initial load
duke
parents:
diff changeset
   153
 * ?run main Test4625418 IBM284
90ce3da70b43 Initial load
duke
parents:
diff changeset
   154
 * ?run main Test4625418 IBM285
90ce3da70b43 Initial load
duke
parents:
diff changeset
   155
 * ?run main Test4625418 IBM297
90ce3da70b43 Initial load
duke
parents:
diff changeset
   156
 * ?run main Test4625418 IBM420
90ce3da70b43 Initial load
duke
parents:
diff changeset
   157
 * ?run main Test4625418 IBM424
90ce3da70b43 Initial load
duke
parents:
diff changeset
   158
 * @run main Test4625418 IBM437
90ce3da70b43 Initial load
duke
parents:
diff changeset
   159
 * ?run main Test4625418 IBM500
90ce3da70b43 Initial load
duke
parents:
diff changeset
   160
 * @run main Test4625418 IBM775
90ce3da70b43 Initial load
duke
parents:
diff changeset
   161
 * @run main Test4625418 IBM850
90ce3da70b43 Initial load
duke
parents:
diff changeset
   162
 * @run main Test4625418 IBM852
90ce3da70b43 Initial load
duke
parents:
diff changeset
   163
 * @run main Test4625418 IBM855
90ce3da70b43 Initial load
duke
parents:
diff changeset
   164
 * @run main Test4625418 IBM857
90ce3da70b43 Initial load
duke
parents:
diff changeset
   165
 * @run main Test4625418 IBM860
90ce3da70b43 Initial load
duke
parents:
diff changeset
   166
 * @run main Test4625418 IBM861
90ce3da70b43 Initial load
duke
parents:
diff changeset
   167
 * @run main Test4625418 IBM862
90ce3da70b43 Initial load
duke
parents:
diff changeset
   168
 * @run main Test4625418 IBM863
90ce3da70b43 Initial load
duke
parents:
diff changeset
   169
 * @run main Test4625418 IBM864
90ce3da70b43 Initial load
duke
parents:
diff changeset
   170
 * @run main Test4625418 IBM865
90ce3da70b43 Initial load
duke
parents:
diff changeset
   171
 * @run main Test4625418 IBM866
90ce3da70b43 Initial load
duke
parents:
diff changeset
   172
 * @run main Test4625418 IBM868
90ce3da70b43 Initial load
duke
parents:
diff changeset
   173
 * @run main Test4625418 IBM869
90ce3da70b43 Initial load
duke
parents:
diff changeset
   174
 * ?run main Test4625418 IBM870
90ce3da70b43 Initial load
duke
parents:
diff changeset
   175
 * ?run main Test4625418 IBM871
90ce3da70b43 Initial load
duke
parents:
diff changeset
   176
 * ?run main Test4625418 IBM918
90ce3da70b43 Initial load
duke
parents:
diff changeset
   177
 * ?run main Test4625418 ISCII91
90ce3da70b43 Initial load
duke
parents:
diff changeset
   178
 * -run main Test4625418 ISO-2022-CN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   179
 * @run main Test4625418 ISO-2022-JP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   180
 * @run main Test4625418 ISO-2022-KR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   181
 * @run main Test4625418 ISO-8859-1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   182
 * @run main Test4625418 ISO-8859-13
90ce3da70b43 Initial load
duke
parents:
diff changeset
   183
 * @run main Test4625418 ISO-8859-15
90ce3da70b43 Initial load
duke
parents:
diff changeset
   184
 * @run main Test4625418 ISO-8859-2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   185
 * @run main Test4625418 ISO-8859-3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   186
 * @run main Test4625418 ISO-8859-4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   187
 * @run main Test4625418 ISO-8859-5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   188
 * @run main Test4625418 ISO-8859-6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   189
 * @run main Test4625418 ISO-8859-7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   190
 * @run main Test4625418 ISO-8859-8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   191
 * @run main Test4625418 ISO-8859-9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   192
 * -run main Test4625418 ISO2022CN
90ce3da70b43 Initial load
duke
parents:
diff changeset
   193
 * @run main Test4625418 ISO2022JP
90ce3da70b43 Initial load
duke
parents:
diff changeset
   194
 * @run main Test4625418 ISO2022KR
90ce3da70b43 Initial load
duke
parents:
diff changeset
   195
 * -run main Test4625418 ISO2022_CN_CNS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   196
 * -run main Test4625418 ISO2022_CN_GB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   197
 * @run main Test4625418 ISO8859_1
90ce3da70b43 Initial load
duke
parents:
diff changeset
   198
 * @run main Test4625418 ISO8859_13
90ce3da70b43 Initial load
duke
parents:
diff changeset
   199
 * @run main Test4625418 ISO8859_15
90ce3da70b43 Initial load
duke
parents:
diff changeset
   200
 * @run main Test4625418 ISO8859_2
90ce3da70b43 Initial load
duke
parents:
diff changeset
   201
 * @run main Test4625418 ISO8859_3
90ce3da70b43 Initial load
duke
parents:
diff changeset
   202
 * @run main Test4625418 ISO8859_4
90ce3da70b43 Initial load
duke
parents:
diff changeset
   203
 * @run main Test4625418 ISO8859_5
90ce3da70b43 Initial load
duke
parents:
diff changeset
   204
 * @run main Test4625418 ISO8859_6
90ce3da70b43 Initial load
duke
parents:
diff changeset
   205
 * @run main Test4625418 ISO8859_7
90ce3da70b43 Initial load
duke
parents:
diff changeset
   206
 * @run main Test4625418 ISO8859_8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   207
 * @run main Test4625418 ISO8859_9
90ce3da70b43 Initial load
duke
parents:
diff changeset
   208
 * -run main Test4625418 JISAutoDetect
90ce3da70b43 Initial load
duke
parents:
diff changeset
   209
 * ?run main Test4625418 JIS_X0201
90ce3da70b43 Initial load
duke
parents:
diff changeset
   210
 * -run main Test4625418 JIS_X0212-1990
90ce3da70b43 Initial load
duke
parents:
diff changeset
   211
 * @run main Test4625418 KOI8-R
90ce3da70b43 Initial load
duke
parents:
diff changeset
   212
 * @run main Test4625418 KOI8-U
90ce3da70b43 Initial load
duke
parents:
diff changeset
   213
 * @run main Test4625418 KOI8_R
90ce3da70b43 Initial load
duke
parents:
diff changeset
   214
 * @run main Test4625418 KOI8_U
90ce3da70b43 Initial load
duke
parents:
diff changeset
   215
 * @run main Test4625418 MS874
90ce3da70b43 Initial load
duke
parents:
diff changeset
   216
 * ?run main Test4625418 MS932
90ce3da70b43 Initial load
duke
parents:
diff changeset
   217
 * ?run main Test4625418 MS936
90ce3da70b43 Initial load
duke
parents:
diff changeset
   218
 * @run main Test4625418 MS949
90ce3da70b43 Initial load
duke
parents:
diff changeset
   219
 * @run main Test4625418 MS950
90ce3da70b43 Initial load
duke
parents:
diff changeset
   220
 * ?run main Test4625418 MS950_HKSCS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   221
 * @run main Test4625418 MacArabic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   222
 * @run main Test4625418 MacCentralEurope
90ce3da70b43 Initial load
duke
parents:
diff changeset
   223
 * @run main Test4625418 MacCroatian
90ce3da70b43 Initial load
duke
parents:
diff changeset
   224
 * @run main Test4625418 MacCyrillic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   225
 * -run main Test4625418 MacDingbat
90ce3da70b43 Initial load
duke
parents:
diff changeset
   226
 * @run main Test4625418 MacGreek
90ce3da70b43 Initial load
duke
parents:
diff changeset
   227
 * @run main Test4625418 MacHebrew
90ce3da70b43 Initial load
duke
parents:
diff changeset
   228
 * @run main Test4625418 MacIceland
90ce3da70b43 Initial load
duke
parents:
diff changeset
   229
 * @run main Test4625418 MacRoman
90ce3da70b43 Initial load
duke
parents:
diff changeset
   230
 * @run main Test4625418 MacRomania
90ce3da70b43 Initial load
duke
parents:
diff changeset
   231
 * -run main Test4625418 MacSymbol
90ce3da70b43 Initial load
duke
parents:
diff changeset
   232
 * @run main Test4625418 MacThai
90ce3da70b43 Initial load
duke
parents:
diff changeset
   233
 * @run main Test4625418 MacTurkish
90ce3da70b43 Initial load
duke
parents:
diff changeset
   234
 * @run main Test4625418 MacUkraine
90ce3da70b43 Initial load
duke
parents:
diff changeset
   235
 * ?run main Test4625418 PCK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   236
 * ?run main Test4625418 SJIS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   237
 * ?run main Test4625418 Shift_JIS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   238
 * @run main Test4625418 TIS-620
90ce3da70b43 Initial load
duke
parents:
diff changeset
   239
 * @run main Test4625418 TIS620
90ce3da70b43 Initial load
duke
parents:
diff changeset
   240
 * @run main Test4625418 US-ASCII
90ce3da70b43 Initial load
duke
parents:
diff changeset
   241
 * @run main Test4625418 UTF-16
90ce3da70b43 Initial load
duke
parents:
diff changeset
   242
 * @run main Test4625418 UTF-16BE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   243
 * @run main Test4625418 UTF-16LE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   244
 * @run main Test4625418 UTF-32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   245
 * @run main Test4625418 UTF-32BE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   246
 * @run main Test4625418 UTF-32LE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   247
 * @run main Test4625418 UTF-8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   248
 * @run main Test4625418 UTF8
90ce3da70b43 Initial load
duke
parents:
diff changeset
   249
 * @run main Test4625418 UTF_32
90ce3da70b43 Initial load
duke
parents:
diff changeset
   250
 * @run main Test4625418 UTF_32BE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   251
 * -run main Test4625418 UTF_32BE_BOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   252
 * @run main Test4625418 UTF_32LE
90ce3da70b43 Initial load
duke
parents:
diff changeset
   253
 * -run main Test4625418 UTF_32LE_BOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   254
 * @run main Test4625418 UnicodeBig
90ce3da70b43 Initial load
duke
parents:
diff changeset
   255
 * @run main Test4625418 UnicodeBigUnmarked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   256
 * @run main Test4625418 UnicodeLittle
90ce3da70b43 Initial load
duke
parents:
diff changeset
   257
 * @run main Test4625418 UnicodeLittleUnmarked
90ce3da70b43 Initial load
duke
parents:
diff changeset
   258
 * @run main Test4625418 windows-1250
90ce3da70b43 Initial load
duke
parents:
diff changeset
   259
 * @run main Test4625418 windows-1251
90ce3da70b43 Initial load
duke
parents:
diff changeset
   260
 * @run main Test4625418 windows-1252
90ce3da70b43 Initial load
duke
parents:
diff changeset
   261
 * @run main Test4625418 windows-1253
90ce3da70b43 Initial load
duke
parents:
diff changeset
   262
 * @run main Test4625418 windows-1254
90ce3da70b43 Initial load
duke
parents:
diff changeset
   263
 * @run main Test4625418 windows-1255
90ce3da70b43 Initial load
duke
parents:
diff changeset
   264
 * @run main Test4625418 windows-1256
90ce3da70b43 Initial load
duke
parents:
diff changeset
   265
 * @run main Test4625418 windows-1257
90ce3da70b43 Initial load
duke
parents:
diff changeset
   266
 * @run main Test4625418 windows-1258
90ce3da70b43 Initial load
duke
parents:
diff changeset
   267
 * ?run main Test4625418 windows-31j
90ce3da70b43 Initial load
duke
parents:
diff changeset
   268
 * -run main Test4625418 x-Big5_Solaris
90ce3da70b43 Initial load
duke
parents:
diff changeset
   269
 * ?run main Test4625418 x-EUC-TW
90ce3da70b43 Initial load
duke
parents:
diff changeset
   270
 * @run main Test4625418 x-IBM1006
90ce3da70b43 Initial load
duke
parents:
diff changeset
   271
 * ?run main Test4625418 x-IBM1025
90ce3da70b43 Initial load
duke
parents:
diff changeset
   272
 * @run main Test4625418 x-IBM1046
90ce3da70b43 Initial load
duke
parents:
diff changeset
   273
 * @run main Test4625418 x-IBM1097
90ce3da70b43 Initial load
duke
parents:
diff changeset
   274
 * @run main Test4625418 x-IBM1098
90ce3da70b43 Initial load
duke
parents:
diff changeset
   275
 * ?run main Test4625418 x-IBM1112
90ce3da70b43 Initial load
duke
parents:
diff changeset
   276
 * ?run main Test4625418 x-IBM1122
90ce3da70b43 Initial load
duke
parents:
diff changeset
   277
 * ?run main Test4625418 x-IBM1123
90ce3da70b43 Initial load
duke
parents:
diff changeset
   278
 * @run main Test4625418 x-IBM1124
90ce3da70b43 Initial load
duke
parents:
diff changeset
   279
 * ?run main Test4625418 x-IBM1381
90ce3da70b43 Initial load
duke
parents:
diff changeset
   280
 * ?run main Test4625418 x-IBM1383
90ce3da70b43 Initial load
duke
parents:
diff changeset
   281
 * ?run main Test4625418 x-IBM33722
90ce3da70b43 Initial load
duke
parents:
diff changeset
   282
 * @run main Test4625418 x-IBM737
90ce3da70b43 Initial load
duke
parents:
diff changeset
   283
 * -run main Test4625418 x-IBM834
90ce3da70b43 Initial load
duke
parents:
diff changeset
   284
 * @run main Test4625418 x-IBM856
90ce3da70b43 Initial load
duke
parents:
diff changeset
   285
 * @run main Test4625418 x-IBM874
90ce3da70b43 Initial load
duke
parents:
diff changeset
   286
 * ?run main Test4625418 x-IBM875
90ce3da70b43 Initial load
duke
parents:
diff changeset
   287
 * @run main Test4625418 x-IBM921
90ce3da70b43 Initial load
duke
parents:
diff changeset
   288
 * @run main Test4625418 x-IBM922
90ce3da70b43 Initial load
duke
parents:
diff changeset
   289
 * -run main Test4625418 x-IBM930
90ce3da70b43 Initial load
duke
parents:
diff changeset
   290
 * @run main Test4625418 x-IBM933
90ce3da70b43 Initial load
duke
parents:
diff changeset
   291
 * ?run main Test4625418 x-IBM935
90ce3da70b43 Initial load
duke
parents:
diff changeset
   292
 * ?run main Test4625418 x-IBM937
90ce3da70b43 Initial load
duke
parents:
diff changeset
   293
 * ?run main Test4625418 x-IBM939
90ce3da70b43 Initial load
duke
parents:
diff changeset
   294
 * ?run main Test4625418 x-IBM942
90ce3da70b43 Initial load
duke
parents:
diff changeset
   295
 * ?run main Test4625418 x-IBM942C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   296
 * @run main Test4625418 x-IBM943
90ce3da70b43 Initial load
duke
parents:
diff changeset
   297
 * ?run main Test4625418 x-IBM943C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   298
 * @run main Test4625418 x-IBM948
90ce3da70b43 Initial load
duke
parents:
diff changeset
   299
 * @run main Test4625418 x-IBM949
90ce3da70b43 Initial load
duke
parents:
diff changeset
   300
 * ?run main Test4625418 x-IBM949C
90ce3da70b43 Initial load
duke
parents:
diff changeset
   301
 * @run main Test4625418 x-IBM950
90ce3da70b43 Initial load
duke
parents:
diff changeset
   302
 * @run main Test4625418 x-IBM964
90ce3da70b43 Initial load
duke
parents:
diff changeset
   303
 * ?run main Test4625418 x-IBM970
90ce3da70b43 Initial load
duke
parents:
diff changeset
   304
 * ?run main Test4625418 x-ISCII91
90ce3da70b43 Initial load
duke
parents:
diff changeset
   305
 * -run main Test4625418 x-ISO2022-CN-CNS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   306
 * -run main Test4625418 x-ISO2022-CN-GB
90ce3da70b43 Initial load
duke
parents:
diff changeset
   307
 * -run main Test4625418 x-JIS0208
90ce3da70b43 Initial load
duke
parents:
diff changeset
   308
 * -run main Test4625418 x-JISAutoDetect
90ce3da70b43 Initial load
duke
parents:
diff changeset
   309
 * @run main Test4625418 x-Johab
90ce3da70b43 Initial load
duke
parents:
diff changeset
   310
 * ?run main Test4625418 x-MS950-HKSCS
90ce3da70b43 Initial load
duke
parents:
diff changeset
   311
 * @run main Test4625418 x-MacArabic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   312
 * @run main Test4625418 x-MacCentralEurope
90ce3da70b43 Initial load
duke
parents:
diff changeset
   313
 * @run main Test4625418 x-MacCroatian
90ce3da70b43 Initial load
duke
parents:
diff changeset
   314
 * @run main Test4625418 x-MacCyrillic
90ce3da70b43 Initial load
duke
parents:
diff changeset
   315
 * -run main Test4625418 x-MacDingbat
90ce3da70b43 Initial load
duke
parents:
diff changeset
   316
 * @run main Test4625418 x-MacGreek
90ce3da70b43 Initial load
duke
parents:
diff changeset
   317
 * @run main Test4625418 x-MacHebrew
90ce3da70b43 Initial load
duke
parents:
diff changeset
   318
 * @run main Test4625418 x-MacIceland
90ce3da70b43 Initial load
duke
parents:
diff changeset
   319
 * @run main Test4625418 x-MacRoman
90ce3da70b43 Initial load
duke
parents:
diff changeset
   320
 * @run main Test4625418 x-MacRomania
90ce3da70b43 Initial load
duke
parents:
diff changeset
   321
 * -run main Test4625418 x-MacSymbol
90ce3da70b43 Initial load
duke
parents:
diff changeset
   322
 * @run main Test4625418 x-MacThai
90ce3da70b43 Initial load
duke
parents:
diff changeset
   323
 * @run main Test4625418 x-MacTurkish
90ce3da70b43 Initial load
duke
parents:
diff changeset
   324
 * @run main Test4625418 x-MacUkraine
90ce3da70b43 Initial load
duke
parents:
diff changeset
   325
 * ?run main Test4625418 x-PCK
90ce3da70b43 Initial load
duke
parents:
diff changeset
   326
 * @run main Test4625418 x-UTF-16LE-BOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   327
 * -run main Test4625418 x-UTF-32BE-BOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   328
 * -run main Test4625418 x-UTF-32LE-BOM
90ce3da70b43 Initial load
duke
parents:
diff changeset
   329
 * ?run main Test4625418 x-euc-jp-linux
90ce3da70b43 Initial load
duke
parents:
diff changeset
   330
 * ?run main Test4625418 x-eucJP-Open
90ce3da70b43 Initial load
duke
parents:
diff changeset
   331
 * @run main Test4625418 x-iso-8859-11
90ce3da70b43 Initial load
duke
parents:
diff changeset
   332
 * @run main Test4625418 x-mswin-936
90ce3da70b43 Initial load
duke
parents:
diff changeset
   333
 * ?run main Test4625418 x-windows-50220
90ce3da70b43 Initial load
duke
parents:
diff changeset
   334
 * ?run main Test4625418 x-windows-50221
90ce3da70b43 Initial load
duke
parents:
diff changeset
   335
 * @run main Test4625418 x-windows-874
90ce3da70b43 Initial load
duke
parents:
diff changeset
   336
 * @run main Test4625418 x-windows-949
90ce3da70b43 Initial load
duke
parents:
diff changeset
   337
 * @run main Test4625418 x-windows-950
90ce3da70b43 Initial load
duke
parents:
diff changeset
   338
 * ?run main Test4625418 x-windows-iso2022jp
90ce3da70b43 Initial load
duke
parents:
diff changeset
   339
 */
90ce3da70b43 Initial load
duke
parents:
diff changeset
   340
90ce3da70b43 Initial load
duke
parents:
diff changeset
   341
import java.beans.ExceptionListener;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   342
import java.beans.XMLDecoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   343
import java.beans.XMLEncoder;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   344
import java.io.File;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   345
import java.io.FileInputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   346
import java.io.FileNotFoundException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   347
import java.io.FileOutputStream;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   348
import java.nio.charset.IllegalCharsetNameException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   349
import java.nio.charset.UnsupportedCharsetException;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   350
90ce3da70b43 Initial load
duke
parents:
diff changeset
   351
public final class Test4625418 implements ExceptionListener {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   352
    public static void main(String[] args) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   353
        new Test4625418(args[0]).test(createString(0x10000));
90ce3da70b43 Initial load
duke
parents:
diff changeset
   354
        System.out.println("Test passed: " + args[0]);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   355
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   356
90ce3da70b43 Initial load
duke
parents:
diff changeset
   357
    private static String createString(int length) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   358
        StringBuilder sb = new StringBuilder(length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   359
        while (0 < length--)
90ce3da70b43 Initial load
duke
parents:
diff changeset
   360
            sb.append((char) length);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   361
90ce3da70b43 Initial load
duke
parents:
diff changeset
   362
        return sb.toString();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   363
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   364
90ce3da70b43 Initial load
duke
parents:
diff changeset
   365
    private final String encoding;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   366
90ce3da70b43 Initial load
duke
parents:
diff changeset
   367
    private Test4625418(String encoding) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   368
        this.encoding = encoding;
90ce3da70b43 Initial load
duke
parents:
diff changeset
   369
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   370
90ce3da70b43 Initial load
duke
parents:
diff changeset
   371
    private void test(String string) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   372
        try {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   373
            File file = new File("4625418." + this.encoding + ".xml");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   374
90ce3da70b43 Initial load
duke
parents:
diff changeset
   375
            FileOutputStream output = new FileOutputStream(file);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   376
            XMLEncoder encoder = new XMLEncoder(output, this.encoding, true, 0);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   377
            encoder.setExceptionListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   378
            encoder.writeObject(string);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   379
            encoder.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   380
90ce3da70b43 Initial load
duke
parents:
diff changeset
   381
            FileInputStream input = new FileInputStream(file);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   382
            XMLDecoder decoder = new XMLDecoder(input);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   383
            decoder.setExceptionListener(this);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   384
            Object object = decoder.readObject();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   385
            decoder.close();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   386
90ce3da70b43 Initial load
duke
parents:
diff changeset
   387
            if (!string.equals(object))
90ce3da70b43 Initial load
duke
parents:
diff changeset
   388
                throw new Error(this.encoding + " - can't read properly");
90ce3da70b43 Initial load
duke
parents:
diff changeset
   389
90ce3da70b43 Initial load
duke
parents:
diff changeset
   390
            file.delete();
90ce3da70b43 Initial load
duke
parents:
diff changeset
   391
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   392
        catch (FileNotFoundException exception) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   393
            throw new Error(this.encoding + " - file not found", exception);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   394
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   395
        catch (IllegalCharsetNameException exception) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   396
            throw new Error(this.encoding + " - illegal charset name", exception);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   397
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   398
        catch (UnsupportedCharsetException exception) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   399
            throw new Error(this.encoding + " - unsupported charset", exception);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   400
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   401
        catch (UnsupportedOperationException exception) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   402
            throw new Error(this.encoding + " - unsupported encoder", exception);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   403
        }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   404
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   405
90ce3da70b43 Initial load
duke
parents:
diff changeset
   406
    public void exceptionThrown(Exception exception) {
90ce3da70b43 Initial load
duke
parents:
diff changeset
   407
        throw new Error(this.encoding + " - internal", exception);
90ce3da70b43 Initial load
duke
parents:
diff changeset
   408
    }
90ce3da70b43 Initial load
duke
parents:
diff changeset
   409
}