commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r151305 - jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable
Date Fri, 04 Feb 2005 03:07:50 GMT
Author: bayard
Date: Thu Feb  3 19:07:49 2005
New Revision: 151305

URL: http://svn.apache.org/viewcvs?view=rev&rev=151305
Log:
testing all primitive value methods, including the ones not implemented in the MutableXxx
class so that we can tell when Sun change the wrapper implementations

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableFloatTest.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableIntTest.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableLongTest.java
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableShortTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableByteTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableByteTest.java,v 1.3 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableByte
  */
 public class MutableByteTest extends TestCase {
@@ -133,6 +133,8 @@
         
         assertEquals( 1.0F, mutNum.floatValue(), 0 );
         assertEquals( 1.0, mutNum.doubleValue(), 0 );
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
         assertEquals( 1, mutNum.intValue() );
         assertEquals( 1L, mutNum.longValue() );
     }

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableDoubleTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableDoubleTest.java,v 1.3 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableDouble
  */
 public class MutableDoubleTest extends TestCase {
@@ -143,6 +143,9 @@
         MutableDouble mutNum = new MutableDouble(1.7);
         
         assertEquals( 1.7F, mutNum.floatValue(), 0 );
+        assertEquals( 1.7, mutNum.doubleValue(), 0 );
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
         assertEquals( 1, mutNum.intValue() );
         assertEquals( 1L, mutNum.longValue() );
     }

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableFloatTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableFloatTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableFloatTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableFloatTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableFloatTest.java,v 1.3 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableFloat
  */
 public class MutableFloatTest extends TestCase {
@@ -144,6 +144,9 @@
         
         assertEquals( 1, mutNum.intValue() );
         assertEquals( 1.7, mutNum.doubleValue(), 0.00001 );
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
+        assertEquals( 1, mutNum.intValue() );
         assertEquals( 1L, mutNum.longValue() );
     }
 

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableIntTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableIntTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableIntTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableIntTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableIntTest.java,v 1.2 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableInt
  */
 public class MutableIntTest extends TestCase {
@@ -131,6 +131,8 @@
     public void testPrimitiveValues() {
         MutableInt mutNum = new MutableInt(1);
         
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
         assertEquals( 1.0F, mutNum.floatValue(), 0 );
         assertEquals( 1.0, mutNum.doubleValue(), 0 );
         assertEquals( 1L, mutNum.longValue() );

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableLongTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableLongTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableLongTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableLongTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableLongTest.java,v 1.3 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableLong
  */
 public class MutableLongTest extends TestCase {
@@ -133,6 +133,10 @@
 
         assertEquals( 1.0F, mutNum.floatValue(), 0 );
         assertEquals( 1.0, mutNum.doubleValue(), 0 );
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
+        assertEquals( 1, mutNum.intValue() );
+        assertEquals( 1L, mutNum.longValue() );
     }
 
     public void testToString() {

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableShortTest.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableShortTest.java?view=diff&r1=151304&r2=151305
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableShortTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/mutable/MutableShortTest.java
Thu Feb  3 19:07:49 2005
@@ -23,7 +23,7 @@
 /**
  * JUnit tests.
  * 
- * @version $Id: MutableShortTest.java,v 1.3 2004/12/26 02:35:47 bayard Exp $
+ * @version $Id$
  * @see MutableShort
  */
 public class MutableShortTest extends TestCase {
@@ -133,6 +133,8 @@
         
         assertEquals( 1.0F, mutNum.floatValue(), 0 );
         assertEquals( 1.0, mutNum.doubleValue(), 0 );
+        assertEquals( (byte) 1, mutNum.byteValue() );
+        assertEquals( (short) 1, mutNum.shortValue() );
         assertEquals( 1, mutNum.intValue() );
         assertEquals( 1L, mutNum.longValue() );
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message