jdk/test/java/text/Collator/G7Test.java
author amlu
Fri, 18 Nov 2016 14:39:03 +0800
changeset 42166 5582c83b1156
parent 40679 5378433ac23f
permissions -rw-r--r--
8169836: ProblemList update for java/lang/management/MemoryMXBean/PendingAllGC.sh Reviewed-by: mchung
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
38581
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     1
/*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     2
 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     4
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     7
 * published by the Free Software Foundation.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     8
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    13
 * accompanied this code).
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    14
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    18
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    21
 * questions.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    22
 */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    23
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    24
/*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    25
 * @test
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    26
 * @library /java/text/testlib
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    27
 * @summary test G7 Collation
40679
5378433ac23f 8164859: Fix module dependences in java/text tests
shurailine
parents: 38581
diff changeset
    28
 * @modules jdk.localedata
38581
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    29
 */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    30
/*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    31
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    32
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    33
 * (C) Copyright Taligent, Inc. 1996, 1997 - All Rights Reserved
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    34
 * (C) Copyright IBM Corp. 1996, 1997 - All Rights Reserved
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    35
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    36
 * Portions copyright (c) 2007 Sun Microsystems, Inc. All Rights Reserved.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    37
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    38
 *   The original version of this source code and documentation is copyrighted
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    39
 * and owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    40
 * materials are provided under terms of a License Agreement between Taligent
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    41
 * and Sun. This technology is protected by multiple US and International
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    42
 * patents. This notice and attribution to Taligent may not be removed.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    43
 *   Taligent is a registered trademark of Taligent, Inc.
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    44
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    45
*/
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    46
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    47
/**
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    48
 * G7 Test cases
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    49
 *
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    50
 * @author     Helena Shih
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    51
 */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    52
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    53
import java.text.Collator;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    54
import java.text.RuleBasedCollator;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    55
import java.util.Locale;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    56
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    57
// G7 test program for printing out test results
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    58
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    59
public class G7Test extends CollatorTest {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    60
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    61
    public static void main(String[] args) throws Exception {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    62
        new G7Test().run(args);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    63
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    64
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    65
    private static final String testCases[] = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    66
        "black-birds",              // 0
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    67
        "Pat",                      // 1
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    68
        "p\u00E9ch\u00E9",          // 2
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    69
        "p\u00EAche",               // 3
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    70
        "p\u00E9cher",              // 4
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    71
        "p\u00EAcher",              // 5
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    72
        "Tod",                      // 6
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    73
        "T\u00F6ne",                // 7
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    74
        "Tofu",                     // 8
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    75
        "blackbirds",               // 9
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    76
        "Ton",                      // 10
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    77
        "PAT",                      // 11
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    78
        "blackbird",                // 12
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    79
        "black-bird",               // 13
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    80
        "pat",                      // 14
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    81
        // Additional tests
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    82
        "czar",                     // 15
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    83
        "churo",                    // 16
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    84
        "cat",                      // 17
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    85
        "darn",                     // 18
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    86
        "?",                        // 19
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    87
        "quick",                    // 20
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    88
        "#",                        // 21
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    89
        "&",                        // 22
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    90
        "aardvark",                 // 23
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    91
        "a-rdvark",                 // 24
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    92
        "abbot",                    // 25
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    93
        "coop",                     // 26
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    94
        "co-p",                     // 27
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    95
        "cop",                      // 28
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    96
        "zebra"                     // 29
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    97
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    98
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
    99
    // loop to TOTALTESTSET
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   100
    private static final int[][] G7Results = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   101
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   102
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   103
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // en_US
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   104
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   105
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   106
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // en_GB
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   107
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   108
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   109
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // en_CA
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   110
        { 12, 13,  9,  0, 14,  1, 11,  3,  2,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   111
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   112
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // fr_FR
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   113
        { 12, 13,  9,  0, 14,  1, 11,  3,  2,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   114
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   115
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // fr_CA
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   116
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   117
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   118
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // de_DE
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   119
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   120
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   121
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // it_IT
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   122
        { 12, 13,  9,  0, 14,  1, 11,  2,  3,  4,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   123
           5,  6,  8, 10,  7, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   124
          31, 31, 31, 31, 31, 31, 31, 31, 31, 31 }, // ja_JP
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   125
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   126
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   127
    // new table collation with rules "& Z < p, P"
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   128
    // loop to FIXEDTESTSET
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   129
    private static final int[] Test1Results = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   130
        12, 13,  9,  0,  6,  8, 10,  7, 14,  1,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   131
        11,  2,  3,  4,  5, 31, 31, 31, 31, 31,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   132
        31, 31, 31, 31, 31, 31, 31, 31, 31, 31
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   133
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   134
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   135
    // new table collation with rules "& C < ch , cH, Ch, CH "
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   136
    // loop to TOTALTESTSET
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   137
    private static final int[] Test2Results = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   138
        19, 22, 21, 23, 25, 24, 12, 13,  9,  0,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   139
        17, 26, 28, 27, 15, 16, 18, 14,  1, 11,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   140
         2,  3,  4,  5, 20,  6,  8, 10,  7, 29
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   141
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   142
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   143
    // new table collation with rules
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   144
    //     "& Question-mark ; ? & Hash-mark ; # & Ampersand ; '&'  "
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   145
    // loop to TOTALTESTSET
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   146
    private static final int[] Test3Results = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   147
        23, 25, 22, 24, 12, 13,  9,  0, 17, 16,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   148
        26, 28, 27, 15, 18, 21, 14,  1, 11,  2,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   149
         3,  4,  5, 19, 20,  6,  8, 10,  7, 29
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   150
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   151
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   152
    // analogous to Japanese rules
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   153
    //     " & aa ; a- & ee ; e- & ii ; i- & oo ; o- & uu ; u- "
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   154
    // loop to TOTALTESTSET
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   155
    private static final int[] Test4Results = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   156
        19, 22, 21, 23, 24, 25, 12, 13,  9,  0,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   157
        17, 16, 26, 27, 28, 15, 18, 14,  1, 11,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   158
         2,  3,  4,  5, 20,  6,  8, 10,  7, 29
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   159
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   160
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   161
    public void TestG7Data() {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   162
        for (int i = 0; i < locales.length; i++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   163
            Collator myCollation= null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   164
            RuleBasedCollator tblColl1 = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   165
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   166
            try {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   167
                myCollation = Collator.getInstance(locales[i]);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   168
                tblColl1 = new RuleBasedCollator(((RuleBasedCollator)myCollation).getRules());
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   169
            } catch (Exception foo) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   170
                errln("Exception: " + foo.getMessage() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   171
                      " Locale : " + locales[i].getDisplayName() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   172
                      " getRules failed\n");
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   173
                continue;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   174
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   175
            for (int j = 0; j < FIXEDTESTSET; j++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   176
                for (int n = j+1; n < FIXEDTESTSET; n++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   177
                    doTest(tblColl1, testCases[G7Results[i][j]],
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   178
                           testCases[G7Results[i][n]], -1);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   179
                }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   180
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   181
            myCollation = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   182
        }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   183
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   184
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   185
    /*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   186
     * Demo Test 1 : Create a new table collation with rules "& Z < p, P"
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   187
     */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   188
    public void TestDemoTest1() {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   189
        int j = 0;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   190
        final Collator myCollation = Collator.getInstance(Locale.US);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   191
        final String defRules = ((RuleBasedCollator)myCollation).getRules();
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   192
        RuleBasedCollator tblColl = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   193
        String newRules = defRules + " & Z < p, P";
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   194
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   195
        try {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   196
            tblColl = new RuleBasedCollator(newRules);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   197
            for (j = 0; j < FIXEDTESTSET; j++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   198
                for (int n = j+1; n < FIXEDTESTSET; n++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   199
                    doTest(tblColl, testCases[Test1Results[j]],
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   200
                           testCases[Test1Results[n]], -1);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   201
                }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   202
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   203
            tblColl = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   204
        } catch (Exception foo) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   205
            errln("Exception: " + foo.getMessage() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   206
                  "\nDemo Test 1 Table Collation object creation failed.");
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   207
        }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   208
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   209
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   210
    /*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   211
     * Demo Test 2 : Create a new table collation with rules
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   212
     *     "& C < ch , cH, Ch, CH"
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   213
     */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   214
    public void TestDemoTest2() {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   215
        final Collator myCollation = Collator.getInstance(Locale.US);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   216
        final String defRules = ((RuleBasedCollator)myCollation).getRules();
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   217
        String newRules = defRules + "& C < ch , cH, Ch, CH";
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   218
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   219
        try {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   220
            RuleBasedCollator tblColl = new RuleBasedCollator(newRules);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   221
            for (int j = 0; j < TOTALTESTSET; j++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   222
                for (int n = j+1; n < TOTALTESTSET; n++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   223
                    doTest(tblColl, testCases[Test2Results[j]],
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   224
                           testCases[Test2Results[n]], -1);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   225
                }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   226
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   227
        } catch (Exception foo) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   228
            errln("Exception: " + foo.getMessage() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   229
                  "\nDemo Test 2 Table Collation object creation failed.\n");
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   230
        }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   231
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   232
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   233
    /*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   234
     * Demo Test 3 : Create a new table collation with rules
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   235
     *     "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&'"
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   236
     */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   237
    public void TestDemoTest3() {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   238
        final Collator myCollation = Collator.getInstance(Locale.US);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   239
        final String defRules = ((RuleBasedCollator)myCollation).getRules();
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   240
        RuleBasedCollator tblColl = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   241
        String newRules = defRules + "& Question'-'mark ; '?' & Hash'-'mark ; '#' & Ampersand ; '&";
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   242
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   243
        try {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   244
            tblColl = new RuleBasedCollator(newRules);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   245
            for (int j = 0; j < TOTALTESTSET; j++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   246
                for (int n = j+1; n < TOTALTESTSET; n++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   247
                    doTest(tblColl, testCases[Test3Results[j]],
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   248
                           testCases[Test3Results[n]], -1);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   249
                }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   250
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   251
        } catch (Exception foo) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   252
            errln("Exception: " + foo.getMessage() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   253
                  "\nDemo Test 3 Table Collation object creation failed.");
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   254
        }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   255
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   256
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   257
    /*
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   258
     * Demo Test 4 : Create a new table collation with rules
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   259
     *     " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' "
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   260
     */
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   261
    public void TestDemoTest4() {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   262
        final Collator myCollation = Collator.getInstance(Locale.US);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   263
        final String defRules = ((RuleBasedCollator)myCollation).getRules();
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   264
        RuleBasedCollator tblColl = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   265
        String newRules = defRules + " & aa ; a'-' & ee ; e'-' & ii ; i'-' & oo ; o'-' & uu ; u'-' ";
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   266
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   267
        try {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   268
            tblColl = new RuleBasedCollator(newRules);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   269
            for (int j = 0; j < TOTALTESTSET; j++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   270
                for (int n = j+1; n < TOTALTESTSET; n++) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   271
                    doTest(tblColl, testCases[Test4Results[j]],
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   272
                           testCases[Test4Results[n]], -1);
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   273
                }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   274
            }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   275
        } catch (Exception foo) {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   276
            errln("Exception: " + foo.getMessage() +
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   277
                  "\nDemo Test 4 Table Collation object creation failed.");
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   278
        }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   279
        tblColl = null;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   280
    }
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   281
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   282
    private static final int FIXEDTESTSET = 15;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   283
    private static final int TOTALTESTSET = 30;
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   284
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   285
    private static final Locale locales[] = {
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   286
        Locale.US,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   287
        Locale.UK,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   288
        Locale.CANADA,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   289
        Locale.FRANCE,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   290
        Locale.CANADA_FRENCH,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   291
        Locale.GERMANY,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   292
        Locale.JAPAN,
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   293
        Locale.ITALY
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   294
    };
e761c1ccd13e 8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff changeset
   295
}