harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r596693 [9/9] - in /harmony/enhanced/classlib/branches/java6: ./ depends/jars/ depends/libs/build/ make/ modules/auth/src/main/java/common/org/apache/harmony/auth/jgss/kerberos/ modules/auth/src/main/java/common/org/apache/harmony/auth/jgss...
Date Tue, 20 Nov 2007 14:43:29 GMT
Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java?rev=596693&r1=596692&r2=596693&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/CollationElementIteratorTest.java
Tue Nov 20 06:42:33 2007
@@ -167,7 +167,7 @@
 		CollationElementIterator iterator = rbColl
 				.getCollationElementIterator(text);
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 
 	/*
@@ -183,7 +183,7 @@
 		assertEquals(1, iterator.getOffset());
 		iterator.setText("cha");
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 
 	/*
@@ -199,6 +199,6 @@
 		assertEquals(1, iterator.getOffset());
 		iterator.setText(new StringCharacterIterator("cha"));
 		iterator.setOffset(1);
-		assertEquals(1, iterator.getOffset());
+		assertEquals(0, iterator.getOffset());
 	}
 }

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java?rev=596693&r1=596692&r2=596693&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DateFormatSymbolsTest.java
Tue Nov 20 06:42:33 2007
@@ -99,9 +99,9 @@
         // java.text.DateFormatSymbols.getLocalPatternChars()
         String retVal = dfs.getLocalPatternChars();
 
-        String val = "GyMdkHmsSEDFwWahKzYeugAZvcLQqV";
+        String val = "GyMdkHmsSEDFwWahKzZ";
 
-        assertEquals("Returned incorrect pattern string", val, retVal);
+        assertTrue("Returned incorrect pattern string", retVal.equals(val));
     }
 
     /**
@@ -113,8 +113,9 @@
         String[] retVal = dfs.getMonths();
         String[] val = { "January", "February", "March", "April", "May",
                 "June", "July", "August", "September", "October", "November",
-                "December"};
-        assertEquals("Returned wrong array: ", val.length, retVal.length);
+                "December", "" };
+        if (retVal.length != val.length)
+            fail("Returned wrong array: " + retVal.length);
         for (int i = 0; i < val.length; i++)
             assertTrue("Array values do not match", retVal[i].equals(val[i]));
     }
@@ -127,8 +128,9 @@
         // java.text.DateFormatSymbols.getShortMonths()
         String[] retVal = dfs.getShortMonths();
         String[] val = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
-                "Aug", "Sep", "Oct", "Nov", "Dec"};
-        assertEquals("Returned wrong array: ", val.length, retVal.length);
+                "Aug", "Sep", "Oct", "Nov", "Dec", "" };
+        if (retVal.length != val.length)
+            fail("Returned wrong array");
         for (int i = 0; i < val.length; i++)
             assertTrue("Array values do not match", retVal[i].equals(val[i]));
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java?rev=596693&r1=596692&r2=596693&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatSymbolsTest.java
Tue Nov 20 06:42:33 2007
@@ -68,8 +68,8 @@
      */
     public void test_getCurrency() {
         Currency currency = Currency.getInstance("USD");
-        assertEquals("Returned incorrect currency",
-                dfsUS.getCurrency(), currency);
+        assertTrue("Returned incorrect currency",
+                dfsUS.getCurrency() == currency);
 
         Currency currK = Currency.getInstance("KRW");
         Currency currX = Currency.getInstance("XXX");
@@ -239,8 +239,8 @@
         dfs.setCurrency(currency);
 
         assertTrue("Returned incorrect currency", currency == dfs.getCurrency());
-        assertEquals("Returned incorrect currency symbol", currency.getSymbol(
-                locale), dfs.getCurrencySymbol());
+        assertTrue("Returned incorrect currency symbol", currency.getSymbol(
+                locale).equals(dfs.getCurrencySymbol()));
         assertTrue("Returned incorrect international currency symbol", currency
                 .getCurrencyCode().equals(dfs.getInternationalCurrencySymbol()));
     }
@@ -292,14 +292,17 @@
 
         assertTrue("Test1: Returned incorrect currency", currency == dfs
                 .getCurrency());
-        assertEquals("Test1: Returned incorrect currency symbol", currency
-                .getSymbol(locale), dfs.getCurrencySymbol());
+        assertTrue("Test1: Returned incorrect currency symbol", currency
+                .getSymbol(locale).equals(dfs.getCurrencySymbol()));
         assertTrue("Test1: Returned incorrect international currency symbol",
                 currency.getCurrencyCode().equals(
                         dfs.getInternationalCurrencySymbol()));
 
+        String symbol = dfs.getCurrencySymbol();
         dfs.setInternationalCurrencySymbol("bogus");
-        assertNotNull("Test2: Returned incorrect currency", dfs.getCurrency());
+        assertNull("Test2: Returned incorrect currency", dfs.getCurrency());
+        assertTrue("Test2: Returned incorrect currency symbol", dfs
+                .getCurrencySymbol().equals(symbol));
         assertEquals("Test2: Returned incorrect international currency symbol",
                 "bogus", dfs.getInternationalCurrencySymbol());
     }

Modified: harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java?rev=596693&r1=596692&r2=596693&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/RuleBasedCollatorTest.java
Tue Nov 20 06:42:33 2007
@@ -130,7 +130,7 @@
             String source = "cha";
             CollationElementIterator iterator = coll
                     .getCollationElementIterator(source);
-            int[] e_offset = { 0, 1, 2 ,3};
+            int[] e_offset = { 0, 2, 3 };
             int offset = iterator.getOffset();
             int i = 0;
             assertEquals(e_offset[i++], offset);
@@ -180,7 +180,7 @@
             StringCharacterIterator source = new StringCharacterIterator(text);
             CollationElementIterator iterator = coll
                     .getCollationElementIterator(source);
-            int[] e_offset = { 0, 1, 2, 3 };
+            int[] e_offset = { 0, 2, 3 };
             int offset = iterator.getOffset();
             int i = 0;
             assertEquals(e_offset[i++], offset);



Mime
View raw message