author | okutsu |
Fri, 27 May 2016 14:33:48 +0900 | |
changeset 38581 | e761c1ccd13e |
permissions | -rw-r--r-- |
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 Spanish Collation |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
28 |
*/ |
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 |
(C) Copyright Taligent, Inc. 1996 - 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
|
31 |
(C) Copyright IBM Corp. 1996 - 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
|
32 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
33 |
The original version of this source code and documentation is copyrighted and |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
34 |
owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These materials are |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
35 |
provided under terms of a License Agreement between Taligent and Sun. This |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
36 |
technology is protected by multiple US and International patents. This notice and |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
37 |
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
|
38 |
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
|
39 |
*/ |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
40 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
41 |
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
|
42 |
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
|
43 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
44 |
// Quick dummy 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
|
45 |
public class SpanishTest extends CollatorTest { |
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 |
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
|
48 |
new SpanishTest().run(args); |
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 |
|
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 |
* TestPrimary() |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
53 |
*/ |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
54 |
private static final String[] primarySourceData = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
55 |
"alias", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
56 |
"acHc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
57 |
"acc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
58 |
"Hello" |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
59 |
}; |
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 |
private static final String[] primaryTargetData = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
62 |
"allias", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
63 |
"aCHc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
64 |
"aCHc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
65 |
"hellO" |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
66 |
}; |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
67 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
68 |
private static final int[] primaryResults = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
69 |
-1, 0, -1, 0 |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
70 |
}; |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
71 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
72 |
/* |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
73 |
* TestTertiary() |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
74 |
*/ |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
75 |
private static final String[] tertiarySourceData = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
76 |
"alias", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
77 |
"Elliot", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
78 |
"Hello", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
79 |
"acHc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
80 |
"acc" |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
81 |
}; |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
82 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
83 |
private static final String[] tertiaryTargetData = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
84 |
"allias", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
85 |
"Emiot", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
86 |
"hellO", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
87 |
"aCHc", |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
88 |
"aCHc" |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
89 |
}; |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
90 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
91 |
private static final int[] tertiaryResults = { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
92 |
-1, -1, 1, -1, -1 |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
93 |
}; |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
94 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
95 |
public void TestPrimary() { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
96 |
doTest(myCollation, Collator.PRIMARY, |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
97 |
primarySourceData, primaryTargetData, primaryResults); |
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 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
100 |
public void TestTertiary() { |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
101 |
doTest(myCollation, Collator.TERTIARY, |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
102 |
tertiarySourceData, tertiaryTargetData, tertiaryResults); |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
103 |
} |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
104 |
|
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
105 |
private final Collator myCollation = Collator.getInstance(new Locale("es", "ES", "")); |
e761c1ccd13e
8031145: Re-examine closed i18n tests to see it they can be moved to the jdk repository.
okutsu
parents:
diff
changeset
|
106 |
} |