From 43ed2b3ac4eefa6b120eb3e597c0d48a1d8c3bba Mon Sep 17 00:00:00 2001 From: Dan Bornstein <> Date: Mon, 13 Apr 2009 16:05:22 -0700 Subject: [PATCH] AI 145970: am: CL 145743 Excise the "de" locale out of testResourceBundles(), leaving a TODO and long comment about the situation. Original author: danfuzz Merged from: //branches/cupcake/... Automated import of CL 145970 --- tests/CoreTests/android/core/LocaleTest.java | 45 +++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/tests/CoreTests/android/core/LocaleTest.java b/tests/CoreTests/android/core/LocaleTest.java index 700cf1d2b06e..88b0c06b46bb 100644 --- a/tests/CoreTests/android/core/LocaleTest.java +++ b/tests/CoreTests/android/core/LocaleTest.java @@ -52,6 +52,48 @@ public class LocaleTest extends TestCase { assertEquals("en_US_POSIX", locale.toString()); } + /* + * Tests some must-have locales. TODO: Add back "de". See discussion + * immediately below this method. + */ + @LargeTest + public void testResourceBundles() throws Exception { + Locale eng = new Locale("en", "US"); + DateFormatSymbols engSymbols = new DateFormatSymbols(eng); + + //Locale deu = new Locale("de", "DE"); + //DateFormatSymbols deuSymbols = new DateFormatSymbols(deu); + + TimeZone berlin = TimeZone.getTimeZone("Europe/Berlin"); + + assertEquals("January", engSymbols.getMonths()[0]); + //assertEquals("Januar", deuSymbols.getMonths()[0]); + + assertEquals("Sunday", engSymbols.getWeekdays()[Calendar.SUNDAY]); + //assertEquals("Sonntag", deuSymbols.getWeekdays()[Calendar.SUNDAY]); + + assertEquals("Central European Time", + berlin.getDisplayName(false, TimeZone.LONG, eng)); + assertEquals("Central European Summer Time", + berlin.getDisplayName(true, TimeZone.LONG, eng)); + + //assertEquals("Mitteleurop\u00E4ische Zeit", + // berlin.getDisplayName(false, TimeZone.LONG, deu)); + //assertEquals("Mitteleurop\u00E4ische Sommerzeit", + // berlin.getDisplayName(true, TimeZone.LONG, deu)); + + assertTrue(engSymbols.getZoneStrings().length > 100); + } + + /* + * Disabled version of the above test. The version above omits + * checks for stuff in the "de" locale, because we stripped that + * out as part of the flash reduction effort (so that we could + * still ship on Dream). We expect to have a baseline target that + * includes a large enough system partition to include "de" + * immediately after the last official release for Dream (whenever + * that may be). + * // Test some must-have locales. @LargeTest public void testResourceBundles() throws Exception { @@ -81,7 +123,8 @@ public class LocaleTest extends TestCase { assertTrue(engSymbols.getZoneStrings().length > 100); } - + */ + // Regression test for 1118570: Create test cases for tracking ICU config // changes. This one makes sure we have all necessary locales installed. @MediumTest -- 2.11.0