1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package tests.api.java.nio.charset;
18
19/**
20 * Test UTF-16LE.
21 */
22public class UTF16LECharsetTest extends AbstractCharsetTestCase {
23
24	/**
25	 * Constructor.
26	 */
27	public UTF16LECharsetTest(String arg0) {
28		super(arg0, "UTF-16LE", new String[] { "UTF_16LE", "X-UTF-16LE" },
29				true, true);
30	}
31
32	/*
33	 * (non-Javadoc)
34	 *
35	 * @see tests.api.java.nio.charset.ConcreteCharsetTest#testEncode_Normal()
36	 */
37	public void testEncode_Normal() {
38		String input = "ab\u5D14\u654F";
39		byte[] output = new byte[] { 97, 0, 98, 0, 20, 93, 79, 101 };
40		internalTestEncode(input, output);
41	}
42
43	/*
44	 * (non-Javadoc)
45	 *
46	 * @see tests.api.java.nio.charset.ConcreteCharsetTest#testDecode_Normal()
47	 */
48	public void testDecode_Normal() {
49		byte[] input = new byte[] { 97, 0, 98, 0, 20, 93, 79, 101 };
50		char[] output = "ab\u5D14\u654F".toCharArray();
51		internalTestDecode(input, output);
52	}
53
54}
55