harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ndbe...@apache.org
Subject svn commit: r473796 - /incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
Date Sat, 11 Nov 2006 21:03:50 GMT
Author: ndbeyer
Date: Sat Nov 11 13:03:49 2006
New Revision: 473796

URL: http://svn.apache.org/viewvc?view=rev&rev=473796
Log:
Add regression test for HARMONY-333.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java?view=diff&rev=473796&r1=473795&r2=473796
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/DecimalFormatTest.java
Sat Nov 11 13:03:49 2006
@@ -20,6 +20,7 @@
 import java.io.ObjectInputStream;
 import java.math.BigDecimal;
 import java.math.BigInteger;
+import java.text.AttributedCharacterIterator;
 import java.text.DecimalFormat;
 import java.text.DecimalFormatSymbols;
 import java.text.FieldPosition;
@@ -27,7 +28,6 @@
 import java.text.ParsePosition;
 import java.util.Currency;
 import java.util.Locale;
-
 import junit.framework.TestCase;
 import tests.support.Support_BitSet;
 import tests.support.Support_DecimalFormat;
@@ -35,6 +35,13 @@
 
 public class DecimalFormatTest extends TestCase {
 
+    public void testAttributedCharacterIterator() throws Exception {
+        // Regression for http://issues.apache.org/jira/browse/HARMONY-333
+        AttributedCharacterIterator iterator = new DecimalFormat().formatToCharacterIterator(new
Integer(1));
+        assertNotNull(iterator);
+        assertFalse("attributes should exist", iterator.getAttributes().isEmpty());
+    } 
+    
     /*
      * Test the getter and setter of parseBigDecimal and parseIntegerOnly and
      * test the default value of them.



Mime
View raw message