equal
deleted
inserted
replaced
45 |
45 |
46 case "bug7198834Test": |
46 case "bug7198834Test": |
47 bug7198834Test(); |
47 bug7198834Test(); |
48 break; |
48 break; |
49 |
49 |
|
50 case "tzNameTest": |
|
51 tzNameTest(args[1]); |
|
52 break; |
|
53 |
50 default: |
54 default: |
51 throw new RuntimeException("Test method '"+methodName+"' not found."); |
55 throw new RuntimeException("Test method '"+methodName+"' not found."); |
52 } |
56 } |
53 } |
57 } |
54 |
58 |
79 } |
83 } |
80 } else { |
84 } else { |
81 System.out.println("Windows HOST locale adapter not found. Ignoring this test."); |
85 System.out.println("Windows HOST locale adapter not found. Ignoring this test."); |
82 } |
86 } |
83 } |
87 } |
|
88 |
|
89 static void tzNameTest(String id) { |
|
90 TimeZone tz = TimeZone.getTimeZone(id); |
|
91 String tzName = tz.getDisplayName(false, TimeZone.SHORT, Locale.US); |
|
92 if (tzName.startsWith("GMT")) { |
|
93 throw new RuntimeException("JRE's localized time zone name for "+id+" could not be retrieved. Returned name was: "+tzName); |
|
94 } |
|
95 } |
84 } |
96 } |