You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by py...@apache.org on 2006/10/12 15:06:00 UTC
svn commit: r463237 -
/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/tests/api/java/math/BigIntegerTest.java
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() {