harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smish...@apache.org
Subject svn commit: r397135 [1/2] - /incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/
Date Wed, 26 Apr 2006 07:52:39 GMT
Author: smishura
Date: Wed Apr 26 00:52:36 2006
New Revision: 397135

URL: http://svn.apache.org/viewcvs?rev=397135&view=rev
Log:
Apply patch for HARMONY-353 (improvements to junit test method usage) for math module (excluding conflict updates). All math tests passed on Windows.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAddTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAndTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerCompareTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConvertTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerNotTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOrTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerSubtractTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalArithmeticTest.java Wed Apr 26 00:52:36 2006
@@ -489,7 +489,7 @@
             aNumber.divide(bNumber, BigDecimal.ROUND_UNNECESSARY);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("division by zero"));
+            assertEquals("Improper exception message", "division by zero", e.getMessage());
         }
     }
 
@@ -507,7 +507,7 @@
             aNumber.divide(bNumber, BigDecimal.ROUND_UNNECESSARY);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("rounding mode is ROUND_UNNECESSARY but the result is not exact"));
+            assertEquals("Improper exception message", "rounding mode is ROUND_UNNECESSARY but the result is not exact", e.getMessage());
         }
     }
 
@@ -525,7 +525,7 @@
             aNumber.divide(bNumber, 100);
             fail("IllegalArgumentException has not been caught");
         } catch (IllegalArgumentException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("invalid rounding mode"));
+            assertEquals("Improper exception message", "invalid rounding mode", e.getMessage());
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigDecimalScaleOperationsTest.java Wed Apr 26 00:52:36 2006
@@ -92,7 +92,7 @@
         BigDecimal aNumber = new BigDecimal(new BigInteger(a), aScale);
         BigDecimal bNumber = aNumber.setScale(newScale);
         assertTrue("incorrect scale", bNumber.scale() == newScale);
-        assertTrue("incorrect value", bNumber.compareTo(aNumber) == 0);
+        assertEquals("incorrect value", 0, bNumber.compareTo(aNumber));
     }
 
     /**
@@ -104,7 +104,7 @@
         BigDecimal aNumber = new BigDecimal(a);
         BigDecimal bNumber = aNumber.setScale(newScale);
         assertTrue("incorrect scale", bNumber.scale() == newScale);
-        assertTrue("incorrect value", bNumber.compareTo(aNumber) == 0);
+        assertEquals("incorrect value", 0, bNumber.compareTo(aNumber));
     }
 
     /**
@@ -333,7 +333,7 @@
             BigDecimal bNumber = aNumber.movePointRight(shift);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("scale outside the range of a 32-bit integer"));
+            assertEquals("Improper exception message", "scale outside the range of a 32-bit integer", e.getMessage());
         }
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAddTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAddTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAddTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAddTest.java Wed Apr 26 00:52:36 2006
@@ -45,7 +45,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -65,7 +65,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -87,7 +87,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -109,7 +109,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -131,7 +131,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -153,7 +153,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -174,7 +174,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -195,7 +195,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -216,7 +216,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -237,7 +237,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -259,7 +259,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -281,7 +281,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -303,7 +303,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -325,7 +325,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -344,7 +344,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -364,7 +364,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -384,7 +384,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -404,7 +404,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
     
     /**
@@ -422,7 +422,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -440,7 +440,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -456,7 +456,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -472,7 +472,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -492,6 +492,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAndTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAndTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAndTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerAndTest.java Wed Apr 26 00:52:36 2006
@@ -45,7 +45,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -65,7 +65,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -85,7 +85,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -105,7 +105,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -125,7 +125,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -136,7 +136,7 @@
         BigInteger bNumber = BigInteger.ONE;
         BigInteger result = aNumber.and(bNumber);
         assertTrue(result.equals(BigInteger.ZERO));
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -147,7 +147,7 @@
         BigInteger bNumber = BigInteger.ONE;
         BigInteger result = aNumber.and(bNumber);
         assertTrue(result.equals(BigInteger.ONE));
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -167,7 +167,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -187,7 +187,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -207,7 +207,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -227,7 +227,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -247,7 +247,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -267,7 +267,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -287,7 +287,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -307,7 +307,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -327,7 +327,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -347,7 +347,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -367,7 +367,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -387,7 +387,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -407,7 +407,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -427,6 +427,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerCompareTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerCompareTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerCompareTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerCompareTest.java Wed Apr 26 00:52:36 2006
@@ -42,7 +42,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -59,7 +59,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -74,7 +74,7 @@
         int bSign = 1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 1);
+        assertEquals(1, aNumber.compareTo(bNumber));
     }
     
     /**
@@ -90,7 +90,7 @@
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
         int result = aNumber.compareTo(bNumber);
-        assertTrue(aNumber.compareTo(bNumber) == -1);
+        assertEquals(-1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -104,7 +104,7 @@
         int bSign = 1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 0);
+        assertEquals(0, aNumber.compareTo(bNumber));
     }
     
     /**
@@ -119,7 +119,7 @@
         int bSign = -1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == -1);
+        assertEquals(-1, aNumber.compareTo(bNumber));
     }
     
     /**
@@ -134,7 +134,7 @@
         int bSign = -1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 1);
+        assertEquals(1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -148,7 +148,7 @@
         int bSign = -1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 0);
+        assertEquals(0, aNumber.compareTo(bNumber));
     }
     
     /**
@@ -163,7 +163,7 @@
         int bSign = -1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 1);
+        assertEquals(1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -178,7 +178,7 @@
         int bSign = 1;        
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == -1);
+        assertEquals(-1, aNumber.compareTo(bNumber));
     }
     
     /**
@@ -191,7 +191,7 @@
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = BigInteger.ZERO;
         int result = aNumber.compareTo(bNumber);
-        assertTrue(aNumber.compareTo(bNumber) == 1);
+        assertEquals(1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -203,7 +203,7 @@
         int bSign = 1;
         BigInteger aNumber = BigInteger.ZERO;
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == -1);
+        assertEquals(-1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -215,7 +215,7 @@
         int aSign = -1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
         BigInteger bNumber = BigInteger.ZERO;
-        assertTrue(aNumber.compareTo(bNumber) == -1);
+        assertEquals(-1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -227,7 +227,7 @@
         int bSign = -1;
         BigInteger aNumber = BigInteger.ZERO;
         BigInteger bNumber = new BigInteger(bSign, bBytes);
-        assertTrue(aNumber.compareTo(bNumber) == 1);
+        assertEquals(1, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -237,7 +237,7 @@
     public void testCompareToZeroZero() {
         BigInteger aNumber = BigInteger.ZERO;
         BigInteger bNumber = BigInteger.ZERO;
-        assertTrue(aNumber.compareTo(bNumber) == 0);
+        assertEquals(0, aNumber.compareTo(bNumber));
     }
 
     /**
@@ -352,7 +352,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }    
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -392,7 +392,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }    
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -413,7 +413,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }    
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -502,7 +502,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }    
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -512,7 +512,7 @@
         byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
         int aSign = 1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -522,7 +522,7 @@
         byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
         int aSign = -1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
     
     /**
@@ -530,6 +530,6 @@
      */
     public void testSignumZero() {
         BigInteger aNumber = BigInteger.ZERO;
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java Wed Apr 26 00:52:36 2006
@@ -40,7 +40,7 @@
             BigInteger aNumber = new BigInteger(aBytes);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("zero length array"));
+            assertEquals("Improper exception message", "zero length array", e.getMessage());
         }
     }
     
@@ -57,7 +57,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -73,7 +73,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -89,7 +89,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -105,7 +105,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -121,7 +121,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -137,7 +137,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -153,7 +153,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
     
     /**
@@ -169,7 +169,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -184,7 +184,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -198,7 +198,7 @@
             BigInteger aNumber = new BigInteger(aSign, aBytes);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("sign must be -1, 0, or 1"));
+            assertEquals("Improper exception message", "sign must be -1, 0, or 1", e.getMessage());
         }
     }
     
@@ -213,7 +213,7 @@
             BigInteger aNumber = new BigInteger(aSign, aBytes);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("zero sign with non-zero magnitude"));
+            assertEquals("Improper exception message", "zero sign with non-zero magnitude", e.getMessage());
         }
     }
 
@@ -232,7 +232,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -250,7 +250,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -267,7 +267,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -285,7 +285,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -303,7 +303,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -321,7 +321,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -339,7 +339,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -357,7 +357,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
     
     /**
@@ -375,7 +375,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -392,7 +392,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -410,7 +410,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -428,7 +428,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
     
     /**
@@ -446,7 +446,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -464,7 +464,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -481,7 +481,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -498,7 +498,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -515,7 +515,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -532,7 +532,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -549,7 +549,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -566,7 +566,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**
@@ -580,7 +580,7 @@
             BigInteger aNumber = new BigInteger(value, radix);
             fail("NumberFormatException has not been caught");
         } catch (NumberFormatException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("radix is out of range"));
+            assertEquals("Improper exception message", "radix is out of range", e.getMessage());
         }
     }
     
@@ -639,7 +639,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -655,7 +655,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -671,7 +671,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -687,7 +687,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -703,7 +703,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -719,7 +719,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -735,7 +735,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 
     /**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConvertTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConvertTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConvertTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConvertTest.java Wed Apr 26 00:52:36 2006
@@ -666,7 +666,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -681,7 +681,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -696,7 +696,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -711,7 +711,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -726,7 +726,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
 
     /**
@@ -742,7 +742,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 1);
+        assertEquals("incorrect sign", 1, aNumber.signum());
     }
     
     /**
@@ -757,7 +757,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
 
     /**
@@ -773,7 +773,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == -1);
+        assertEquals("incorrect sign", -1, aNumber.signum());
     }
     /**
      * valueOf (long val): convert a zero long value to a BigInteger.
@@ -787,6 +787,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", aNumber.signum() == 0);
+        assertEquals("incorrect sign", 0, aNumber.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerDivideTest.java Wed Apr 26 00:52:36 2006
@@ -42,7 +42,7 @@
             BigInteger result = aNumber.divide(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("division by zero"));
+            assertEquals("Improper exception message", "division by zero", e.getMessage());
         }
     }
 
@@ -58,7 +58,7 @@
             BigInteger result = aNumber.divide(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("division by zero"));
+            assertEquals("Improper exception message", "division by zero", e.getMessage());
         }
     }
 
@@ -79,7 +79,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -99,7 +99,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -120,7 +120,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -141,7 +141,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -161,7 +161,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -181,7 +181,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -201,7 +201,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -221,7 +221,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -241,7 +241,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
     
     /**
@@ -259,7 +259,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -277,7 +277,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -293,7 +293,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -313,7 +313,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -333,7 +333,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -354,7 +354,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -374,7 +374,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -394,7 +394,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -411,7 +411,7 @@
             BigInteger result = aNumber.remainder(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("division by zero"));
+            assertEquals("Improper exception message", "division by zero", e.getMessage());
         }
     }
 
@@ -432,7 +432,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -452,7 +452,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -472,7 +472,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -493,7 +493,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -514,7 +514,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -534,7 +534,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -554,7 +554,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -574,7 +574,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -600,13 +600,13 @@
                 fail("Incorrect quotation");
             }
         }
-        assertTrue(result[0].signum() == -1);
+        assertEquals(-1, result[0].signum());
         resBytes = result[1].toByteArray();
         for(int i = 0; i < resBytes.length; i++) {
             if (resBytes[i] != rBytes[1][i]) {
                 fail("Incorrect remainder");
             }
-            assertTrue(result[1].signum() == -1);
+            assertEquals(-1, result[1].signum());
         }
     }
     
@@ -624,7 +624,7 @@
             BigInteger result = aNumber.mod(bNumber);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("modulus is non-positive"));
+            assertEquals("Improper exception message", "modulus is non-positive", e.getMessage());
         }
     }
 
@@ -645,7 +645,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -665,6 +665,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerModPowTest.java Wed Apr 26 00:52:36 2006
@@ -45,7 +45,7 @@
 			BigInteger result = aNumber.modPow(exp, modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertTrue("Improper exception message", e.getMessage().equals("non-positive modulus"));
+			assertEquals("Improper exception message", "non-positive modulus", e.getMessage());
 		}
 	}
 
@@ -69,7 +69,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 	
 	/**
@@ -92,7 +92,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -109,7 +109,7 @@
 			BigInteger result = aNumber.modInverse(modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertTrue("Improper exception message", e.getMessage().equals("non-positive modulus"));
+			assertEquals("Improper exception message", "non-positive modulus", e.getMessage());
 		}
 	}
 	
@@ -127,7 +127,7 @@
 			BigInteger result = aNumber.modInverse(modulus);
 			fail("ArithmeticException has not been caught");
 		} catch (ArithmeticException e) {
-			assertTrue("Improper exception message", e.getMessage().equals("non-invertible BigInteger"));
+			assertEquals("Improper exception message", "non-invertible BigInteger", e.getMessage());
 		}
 	}
 
@@ -148,7 +148,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -168,7 +168,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -188,7 +188,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -206,7 +206,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 	
 	/**
@@ -226,7 +226,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -246,7 +246,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 	
 	/**
@@ -264,7 +264,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -279,7 +279,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 0);
+		assertEquals("incorrect sign", 0, result.signum());
 	}
 
 	/**
@@ -299,7 +299,7 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 
 	/**
@@ -319,6 +319,6 @@
 		for(int i = 0; i < resBytes.length; i++) {
 			assertTrue(resBytes[i] == rBytes[i]);
 		}
-		assertTrue("incorrect sign", result.signum() == 1);
+		assertEquals("incorrect sign", 1, result.signum());
 	}
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerMultiplyTest.java Wed Apr 26 00:52:36 2006
@@ -45,7 +45,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -66,7 +66,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -88,7 +88,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -110,7 +110,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -133,7 +133,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -156,7 +156,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -176,7 +176,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -194,7 +194,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -212,7 +212,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -230,7 +230,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -250,7 +250,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -270,7 +270,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -285,7 +285,7 @@
             BigInteger result = aNumber.pow(exp);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("exponent is negative"));
+            assertEquals("Improper exception message", "exponent is negative", e.getMessage());
         }
     }
 
@@ -307,7 +307,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -327,7 +327,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -345,7 +345,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -366,7 +366,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -384,6 +384,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerNotTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerNotTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerNotTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerNotTest.java Wed Apr 26 00:52:36 2006
@@ -45,7 +45,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -65,7 +65,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -85,7 +85,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -105,7 +105,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -120,7 +120,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -135,7 +135,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -152,7 +152,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -169,7 +169,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -187,6 +187,6 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java?rev=397135&r1=397134&r2=397135&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/math/src/test/java/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java Wed Apr 26 00:52:36 2006
@@ -34,7 +34,7 @@
      */
     public void testBitCountZero() {
         BigInteger aNumber = new BigInteger("0");
-        assertTrue(aNumber.bitCount() == 0);
+        assertEquals(0, aNumber.bitCount());
     }
 
     /**
@@ -42,7 +42,7 @@
      */
     public void testBitCountNeg() {
         BigInteger aNumber = new BigInteger("-12378634756382937873487638746283767238657872368748726875");
-        assertTrue(aNumber.bitCount() == 87);
+        assertEquals(87, aNumber.bitCount());
     }
 
     /**
@@ -50,7 +50,7 @@
      */
     public void testBitCountPos() {
         BigInteger aNumber = new BigInteger("12378634756343564757582937873487638746283767238657872368748726875");
-        assertTrue(aNumber.bitCount() == 107);
+        assertEquals(107, aNumber.bitCount());
     }
 
     /**
@@ -58,7 +58,7 @@
      */
     public void testBitLengthZero() {
         BigInteger aNumber = new BigInteger("0");
-        assertTrue(aNumber.bitLength() == 0);
+        assertEquals(0, aNumber.bitLength());
     }
 
     /**
@@ -68,7 +68,7 @@
         byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
         int aSign = 1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 108);
+        assertEquals(108, aNumber.bitLength());
     }
 
     /**
@@ -78,7 +78,7 @@
         byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
         int aSign = 1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 96);
+        assertEquals(96, aNumber.bitLength());
     }
 
     /**
@@ -88,7 +88,7 @@
         byte aBytes[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
         int aSign = 1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 81);
+        assertEquals(81, aNumber.bitLength());
     }
 
     /**
@@ -98,7 +98,7 @@
         byte aBytes[] = {12, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26, 3, 91};
         int aSign = -1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 108);
+        assertEquals(108, aNumber.bitLength());
     }
 
     /**
@@ -108,7 +108,7 @@
         byte aBytes[] = {-128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
         int aSign = -1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 96);
+        assertEquals(96, aNumber.bitLength());
     }
     
     /**
@@ -118,7 +118,7 @@
         byte aBytes[] = {1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
         int aSign = -1;
         BigInteger aNumber = new BigInteger(aSign, aBytes);
-        assertTrue(aNumber.bitLength() == 80);
+        assertEquals(80, aNumber.bitLength());
     }
 
     /**
@@ -133,7 +133,7 @@
             BigInteger result = aNumber.clearBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("negative bit number"));
+            assertEquals("Improper exception message", "negative bit number", e.getMessage());
         }
     }
 
@@ -152,7 +152,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -170,7 +170,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
 
     /**
@@ -188,7 +188,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -206,7 +206,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -263,7 +263,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -281,7 +281,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -299,7 +299,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -317,7 +317,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -335,7 +335,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -353,7 +353,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -371,7 +371,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -389,7 +389,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -407,7 +407,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -425,7 +425,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -440,7 +440,7 @@
             BigInteger result = aNumber.flipBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("negative bit number"));
+            assertEquals("Improper exception message", "negative bit number", e.getMessage());
         }
     }
 
@@ -459,7 +459,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -477,7 +477,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue("incorrect value", resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -495,7 +495,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue("incorrect value", resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -513,7 +513,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -531,7 +531,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -549,7 +549,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -567,7 +567,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -625,7 +625,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -643,7 +643,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -661,7 +661,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -679,7 +679,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -697,7 +697,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -715,7 +715,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -730,7 +730,7 @@
             BigInteger result = aNumber.setBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("negative bit number"));
+            assertEquals("Improper exception message", "negative bit number", e.getMessage());
         }
     }
 
@@ -749,7 +749,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -767,7 +767,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -785,7 +785,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -803,7 +803,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -821,7 +821,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -839,7 +839,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -857,7 +857,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -875,7 +875,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -893,7 +893,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -911,7 +911,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -929,7 +929,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -947,7 +947,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -1003,7 +1003,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -1021,7 +1021,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -1031,8 +1031,8 @@
      */
     public void testSetBitBug1331() {
         BigInteger result = BigInteger.valueOf(0L).setBit(191);
-        assertTrue("incorrect value", result.toString().equals("3138550867693340381917894711603833208051177722232017256448"));
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect value", "3138550867693340381917894711603833208051177722232017256448", result.toString());
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -1050,7 +1050,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -1068,7 +1068,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -1086,7 +1086,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -1104,7 +1104,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -1122,7 +1122,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
     
     /**
@@ -1140,7 +1140,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -1158,7 +1158,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -1176,7 +1176,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
     
     /**
@@ -1194,7 +1194,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 1);
+        assertEquals("incorrect sign", 1, result.signum());
     }
 
     /**
@@ -1212,7 +1212,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == 0);
+        assertEquals("incorrect sign", 0, result.signum());
     }
     
     /**
@@ -1232,7 +1232,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -1252,7 +1252,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -1272,7 +1272,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -1292,7 +1292,7 @@
         for(int i = 0; i < resBytes.length; i++) {
             assertTrue(resBytes[i] == rBytes[i]);
         }
-        assertTrue("incorrect sign", result.signum() == -1);
+        assertEquals("incorrect sign", -1, result.signum());
     }
 
     /**
@@ -1307,7 +1307,7 @@
             boolean result = aNumber.testBit(number);
             fail("ArithmeticException has not been caught");
         } catch (ArithmeticException e) {
-            assertTrue("Improper exception message", e.getMessage().equals("negative bit number"));
+            assertEquals("Improper exception message", "negative bit number", e.getMessage());
         }
     }
 



Mime
View raw message