1 /*
2 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 /*
24 * @test
25 * @bug 4221795 8032446
26 * @summary Confirm Normalizer's fundamental behavior. Imported from ICU4J 3.2's
27 * src/com/ibm/icu/dev/test and modified.
28 * @modules java.base/sun.text java.base/sun.text.normalizer
29 * @library /java/text/testlib
30 * @compile -XDignore.symbol.file ICUBasicTest.java
31 * @run main/timeout=30 ICUBasicTest
32 */
33
34 /*
35 *******************************************************************************
36 * Copyright (C) 1996-2004, International Business Machines Corporation and *
37 * others. All Rights Reserved. *
38 *******************************************************************************
39 */
40
41 import sun.text.Normalizer;
42 import sun.text.normalizer.NormalizerBase;
43 import sun.text.normalizer.NormalizerImpl;
44
45 import static java.text.Normalizer.Form.*;
46 import static sun.text.normalizer.NormalizerBase.Mode.*;
47
48 public class ICUBasicTest extends IntlTest {
49
50 public static void main(String[] args) throws Exception {
51 new ICUBasicTest().run(args);
52 }
53
54 /*
55 * Normalization modes
56 */
57 private static final NormalizerBase.Mode NFCmode = NormalizerBase.NFC;
58 private static final NormalizerBase.Mode NFDmode = NormalizerBase.NFD;
59 private static final NormalizerBase.Mode NFKCmode = NormalizerBase.NFKC;
60 private static final NormalizerBase.Mode NFKDmode = NormalizerBase.NFKD;
61 private static final NormalizerBase.Mode NONEmode = NormalizerBase.NONE;
62
63 /*
64 * Normalization options
65 */
66
|
1 /*
2 * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23 /*
24 * @test
25 * @bug 4221795 8032446 8174270
26 * @summary Confirm Normalizer's fundamental behavior. Imported from ICU4J 3.2's
27 * src/com/ibm/icu/dev/test and modified.
28 * @modules java.base/sun.text java.base/jdk.internal.icu.text
29 * @library /java/text/testlib
30 * @compile -XDignore.symbol.file ICUBasicTest.java
31 * @run main/timeout=30 ICUBasicTest
32 */
33
34 /*
35 *******************************************************************************
36 * Copyright (C) 1996-2004, International Business Machines Corporation and *
37 * others. All Rights Reserved. *
38 *******************************************************************************
39 */
40
41 import sun.text.Normalizer;
42 import jdk.internal.icu.text.NormalizerBase;
43
44 import static java.text.Normalizer.Form.*;
45
46 public class ICUBasicTest extends IntlTest {
47
48 public static void main(String[] args) throws Exception {
49 new ICUBasicTest().run(args);
50 }
51
52 /*
53 * Normalization modes
54 */
55 private static final NormalizerBase.Mode NFCmode = NormalizerBase.NFC;
56 private static final NormalizerBase.Mode NFDmode = NormalizerBase.NFD;
57 private static final NormalizerBase.Mode NFKCmode = NormalizerBase.NFKC;
58 private static final NormalizerBase.Mode NFKDmode = NormalizerBase.NFKD;
59 private static final NormalizerBase.Mode NONEmode = NormalizerBase.NONE;
60
61 /*
62 * Normalization options
63 */
64
|