/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
*
*/
new TimeZoneNameProviderTest();
}
test1();
test2();
aliasTest();
}
void test1() {
// pure JRE implementation
// the time zone
// JRE string array for the id
if (jreHasBundle) {
try {
} catch (MissingResourceException mre) {}
}
// the localized name
// provider's name (if any)
}
// JRE's name (if any)
}
}
}
}
}
};
};
};
void test2() {
try {
": formatted zone names mismatch. " +
formatted + " should match with " +
DISPLAY_NAMES_OSAKA[i]);
}
": formatted zone names mismatch. " +
formatted + " should match with " +
DISPLAY_NAMES_KYOTO[i]);
}
}
} catch (ParseException pe) {
}
}
void aliasTest() {
// Check that provider's name for a standard id (America/Los_Angeles) is
// propagated to its aliases
throw new RuntimeException("Could not get provider's localized name. result: "+latime+" expected: "+LATIME_IN_OSAKA);
}
throw new RuntimeException("Provider's localized name is not available for an alias ID: "+PST+". result: "+pst+" expected: "+LATIME_IN_OSAKA);
}
throw new RuntimeException("Provider's localized name is not available for an alias ID: "+US_PACIFIC+". result: "+us_pacific+" expected: "+LATIME_IN_OSAKA);
}
// Check that provider's name for an alias id (JST) is
// propagated to its standard id and alias ids.
throw new RuntimeException("Could not get provider's localized name. result: "+jstime+" expected: "+JST_IN_OSAKA);
}
throw new RuntimeException("Provider's localized name is not available for a standard ID: "+TOKYOTIME+". result: "+tokyotime+" expected: "+JST_IN_OSAKA);
}
throw new RuntimeException("Provider's localized name is not available for an alias ID: "+JAPAN+". result: "+japan+" expected: "+JST_IN_OSAKA);
}
}
}