< prev index next >

test/jdk/java/text/Normalizer/ConformanceTest.java

Print this page
rev 57619 : imported patch 8174270
   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 6565620 6959267 7070436 7198195 8032446 8221431
  26  * @summary Confirm Normalizer's fundamental behavior
  27  * @library /lib/testlibrary/java/lang
  28  * @modules java.base/sun.text java.base/sun.text.normalizer
  29  * @compile -XDignore.symbol.file ConformanceTest.java
  30  * @run main/timeout=3000 ConformanceTest
  31  */
  32 
  33 import java.io.BufferedReader;
  34 import java.io.File;
  35 import java.io.FileInputStream;
  36 import java.io.InputStreamReader;
  37 import java.lang.reflect.Method;
  38 import java.nio.charset.Charset;
  39 import java.nio.charset.CharsetDecoder;
  40 import java.util.BitSet;
  41 import java.util.StringTokenizer;
  42 
  43 import sun.text.normalizer.NormalizerBase;
  44 import sun.text.normalizer.NormalizerImpl;
  45 
  46 /*
  47  * Conformance test for java.text.Normalizer and sun.text.Normalizer.
  48  */
  49 public class ConformanceTest {
  50 
  51     //
  52     // Options to be used with sun.text.Normalizer
  53     //
  54 
  55     /*
  56      * Default Unicode 3.2.0 normalization. (Provided for IDNA/StringPrep)
  57      *
  58      *   - Without Corrigendum 4 fix
  59      *     (Different from ICU4J 3.2's Normalizer.)
  60      *   - Without Public Review Issue #29 fix
  61      *     (Different from ICU4J 3.2's Normalizer.)
  62      */
  63     private static final int UNICODE_3_2_0 = sun.text.Normalizer.UNICODE_3_2;
  64 


   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 6565620 6959267 7070436 7198195 8032446 8174270 8221431
  26  * @summary Confirm Normalizer's fundamental behavior
  27  * @library /lib/testlibrary/java/lang
  28  * @modules java.base/sun.text java.base/jdk.internal.icu.text
  29  * @compile -XDignore.symbol.file ConformanceTest.java
  30  * @run main/timeout=3000 ConformanceTest
  31  */
  32 
  33 import java.io.BufferedReader;
  34 import java.io.File;
  35 import java.io.FileInputStream;
  36 import java.io.InputStreamReader;

  37 import java.nio.charset.Charset;
  38 import java.nio.charset.CharsetDecoder;
  39 import java.util.BitSet;
  40 import java.util.StringTokenizer;
  41 
  42 import jdk.internal.icu.text.NormalizerBase;

  43 
  44 /*
  45  * Conformance test for java.text.Normalizer and sun.text.Normalizer.
  46  */
  47 public class ConformanceTest {
  48 
  49     //
  50     // Options to be used with sun.text.Normalizer
  51     //
  52 
  53     /*
  54      * Default Unicode 3.2.0 normalization. (Provided for IDNA/StringPrep)
  55      *
  56      *   - Without Corrigendum 4 fix
  57      *     (Different from ICU4J 3.2's Normalizer.)
  58      *   - Without Public Review Issue #29 fix
  59      *     (Different from ICU4J 3.2's Normalizer.)
  60      */
  61     private static final int UNICODE_3_2_0 = sun.text.Normalizer.UNICODE_3_2;
  62 


< prev index next >