harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r463237 - /incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java
Date Thu, 12 Oct 2006 13:06:00 GMT
Author: pyang
Date: Thu Oct 12 06:05:58 2006
New Revision: 463237

URL: http://svn.apache.org/viewvc?view=rev&rev=463237
Log:
Merge regression test for HARMONY-1770([classlib][math]BigInteger has an unexpected 'protected
clone()' method)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java?view=diff&rev=463237&r1=463236&r2=463237
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java
Thu Oct 12 06:05:58 2006
@@ -850,6 +850,26 @@
             }
 		}
 	}
+    
+
+     public void testClone() {
+        // Regression test for HARMONY-1770
+        MyBigInteger myBigInteger = new MyBigInteger("12345");
+        myBigInteger = (MyBigInteger) myBigInteger.clone();
+    }
+
+    static class MyBigInteger extends BigInteger implements Cloneable {
+        public MyBigInteger(String val) {
+            super(val);
+        }
+        public Object clone() {
+            try {
+                return super.clone();
+            } catch (CloneNotSupportedException e) {
+                return null;
+            }
+        }
+    }
 
 	@Override
     protected void setUp() {



Mime
View raw message