1 /* |
1 /* |
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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 |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 import java.util.*; |
24 /* |
|
25 * @test |
|
26 * @bug 8003267 |
|
27 * @summary Unit test for generic time zone names support. This test is locale |
|
28 * data-dependent and assumes that both JRE and CLDR have the same |
|
29 * geneic time zone names in English. |
|
30 * @modules java.base/sun.util.locale.provider |
|
31 * @comment Locale providers: default |
|
32 * @run main GenericTimeZoneNamesTest en-US |
|
33 * @comment Locale providers: CLDR |
|
34 * @run main/othervm -Djava.locale.providers=CLDR GenericTimeZoneNamesTest en-US |
|
35 */ |
|
36 |
|
37 import java.util.Locale; |
|
38 import java.util.TimeZone; |
|
39 |
25 import sun.util.locale.provider.TimeZoneNameUtility; |
40 import sun.util.locale.provider.TimeZoneNameUtility; |
26 |
41 |
27 public class GenericTimeZoneNamesTest { |
42 public class GenericTimeZoneNamesTest { |
28 private static final String[] PT = { |
43 private static final String[] PT = { |
29 "America/Los_Angeles", "US/Pacific", "PST" |
44 "America/Los_Angeles", "US/Pacific", "PST" |