harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ton...@apache.org
Subject svn commit: r616692 - in /harmony/enhanced/classlib/trunk/modules/luni: make/exclude.common src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
Date Wed, 30 Jan 2008 08:56:59 GMT
Author: tonywu
Date: Wed Jan 30 00:56:58 2008
New Revision: 616692

URL: http://svn.apache.org/viewvc?rev=616692&view=rev
Log:
Apply patch for HARMONY-5442 ([classlib][util] some testcases of org.apache.harmony.luni.tests.java.util.LocaleTest
fails on RI)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common?rev=616692&r1=616691&r2=616692&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/make/exclude.common Wed Jan 30 00:56:58 2008
@@ -1,5 +1,4 @@
 org/apache/harmony/luni/tests/java/net/URLClassLoaderTest.java
 org/apache/harmony/luni/tests/java/net/ExcludedProxyTest.java
 org/apache/harmony/luni/tests/java/util/FormatterTest.java
-org/apache/harmony/luni/tests/java/util/LocaleTest.java
 org/apache/harmony/luni/tests/java/util/ScannerTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java?rev=616692&r1=616691&r2=616692&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/util/LocaleTest.java
Wed Jan 30 00:56:58 2008
@@ -102,7 +102,8 @@
         // regression test for HARMONY-1514
         // HashSet can filter duplicate locales
         Set<Locale> localesSet = new HashSet<Locale>(Arrays.asList(locales));
-        assertEquals(localesSet.size(), locales.length);
+        // Non-bug difference for HARMONY-5442
+        assertTrue(localesSet.size() <= locales.length);
     }
 
 	/**
@@ -137,8 +138,9 @@
 				.getDisplayCountry().equals("Canada"));
         
         // Regression for Harmony-1146
+        // Non-bug difference for HARMONY-5442
         Locale l_countryCD = new Locale("", "CD"); //$NON-NLS-1$ //$NON-NLS-2$
-                assertEquals("The Democratic Republic Of Congo", //$NON-NLS-1$
+                assertEquals("Congo - Kinshasa", //$NON-NLS-1$
                         l_countryCD.getDisplayCountry()); 
 	}
 
@@ -254,8 +256,10 @@
         assertEquals("ave", l.getISO3Language());
         
         // Regression for Harmony-1146
+        
+        // Non-bug difference for HARMONY-5442
         Locale l_CountryCS = new Locale("", "CS"); //$NON-NLS-1$ //$NON-NLS-2$
-        assertEquals("SCG", l_CountryCS.getISO3Country()); //$NON-NLS-1$
+        assertEquals("", l_CountryCS.getISO3Country()); //$NON-NLS-1$
         
         // Regression for Harmony-1129
         l = new Locale("ak", ""); //$NON-NLS-1$ //$NON-NLS-2$
@@ -294,10 +298,10 @@
 		// Assumes always at least 131 ISOlanguages...
 		String[] isoLang = Locale.getISOLanguages();
 		int length = isoLang.length;
-		assertTrue("Random element in wrong format.", (isoLang[length / 2]
-				.length() == 2)
-				&& isoLang[length / 2].toLowerCase()
-						.equals(isoLang[length / 2]));
+		
+		// Non-bug difference for HARMONY-5442
+		assertTrue(isoLang[length / 2].length() == 3);
+		assertTrue(isoLang[length / 2].toLowerCase().equals(isoLang[length / 2]));
 		assertTrue("Wrong number of ISOLanguages.", length > 130);
 	}
 
@@ -351,10 +355,12 @@
 		assertEquals("Wrong representation 1", "en", l.toString());
 		l = new Locale("", "CA");
 		assertEquals("Wrong representation 2", "_CA", l.toString());
+		
+		// Non-bug difference for HARMONY-5442
 		l = new Locale("", "CA", "var");
-		assertEquals("Wrong representation 2.5", "_CA_var", l.toString());
+		assertEquals("Wrong representation 2.5", "_CA_VAR", l.toString());
 		l = new Locale("en", "", "WIN");
-		assertEquals("Wrong representation 4", "en__WIN", l.toString());
+		assertEquals("Wrong representation 4", "en_WIN", l.toString());
 		l = new Locale("en", "CA");
 		assertEquals("Wrong representation 6", "en_CA", l.toString());
 		l = new Locale("en", "CA", "VAR");
@@ -375,9 +381,10 @@
 
         List<String> languages = Arrays.asList(Locale.getISOLanguages());
         assertTrue(languages.contains("ak"));
-
+        
+		// Non-bug difference for HARMONY-5442
         List<String> countries = Arrays.asList(Locale.getISOCountries());
-        assertTrue(countries.contains("CS"));
+        assertFalse(countries.contains("CS"));
     }
 
 	/**



Mime
View raw message