harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r1029064 - in /harmony/enhanced/java/branches/java6: ./ classlib/ classlib/depends/libs/ classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/ classlib/modules/archive/src/test/java/org/apache/harmony/archiv...
Date Sat, 30 Oct 2010 13:39:15 GMT
Author: hindessm
Date: Sat Oct 30 13:39:15 2010
New Revision: 1029064

URL: http://svn.apache.org/viewvc?rev=1029064&view=rev
Log:
Merge change from /harmony/enhanced/java/trunk@1027985:

  r1027985 | sjanuary | 2010-10-27 15:53:12 +0100 (Wed, 27 Oct 2010) | 1 line
  
  Archive tests - change some assertTrues to assertEquals where more appropriate

Modified:
    harmony/enhanced/java/branches/java6/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/depends/libs/   (props changed)
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
    harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
    harmony/enhanced/java/branches/java6/drlvm/   (props changed)
    harmony/enhanced/java/branches/java6/jdktools/   (props changed)

Propchange: harmony/enhanced/java/branches/java6/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 13:39:15 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh:935751-941490
-/harmony/enhanced/java/trunk:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413
+/harmony/enhanced/java/trunk:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413,1027985
 /harmony/enhanced/trunk:476395-929252
 /incubator/harmony/enhanced/trunk:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 13:39:15 2010
@@ -1,7 +1,7 @@
 /harmony/enhanced/classlib/trunk:713674-735919,765923-926091,926318-926838
 /harmony/enhanced/classlib/trunk/working_classlib:884014-884286
 /harmony/enhanced/java/branches/mrh/classlib:935751-941490
-/harmony/enhanced/java/trunk/classlib:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413
+/harmony/enhanced/java/trunk/classlib:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413,1027985
 /harmony/enhanced/trunk/classlib:476395-929252
 /harmony/enhanced/trunk/working_classlib:476396-920147
 /incubator/harmony/enhanced/trunk/classlib:292550-476394

Propchange: harmony/enhanced/java/branches/java6/classlib/depends/libs/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 13:39:15 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/classlib/trunk/depends/libs:544451-926091
-/harmony/enhanced/java/trunk/classlib/depends/libs:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413
+/harmony/enhanced/java/trunk/classlib/depends/libs:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413,1027985
 /harmony/enhanced/trunk/classlib/depends/libs:476395-929252
 /incubator/harmony/enhanced/trunk/classlib/depends/libs:292550-476394

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/jar/JarFileTest.java
Sat Oct 30 13:39:15 2010
@@ -367,9 +367,10 @@ public class JarFileTest extends TestCas
         // try to read class file header
         is.read(b, 0, 1024);
         jf.close();
-        assertTrue("Invalid bytes were red", b[0] == (byte) 0xCA
-                && b[1] == (byte) 0xFE && b[2] == (byte) 0xBA
-                && b[3] == (byte) 0xBE);
+        assertEquals("Invalid bytes were read", (byte) 0xCA, b[0]);
+        assertEquals("Invalid bytes were read", (byte) 0xFE, b[1]);
+        assertEquals("Invalid bytes were read", (byte) 0xBA, b[2]);
+        assertEquals("Invalid bytes were read", (byte) 0xBE, b[3]);
     }
 
     /**

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
Sat Oct 30 13:39:15 2010
@@ -142,9 +142,9 @@ public class GZIPInputStreamTest extends
                 "the checkSum value of the compressed and decompressed data does not equal",
                 2074883667L, inGZIP.getChecksum().getValue());
         for (int i = 0; i < orgBuf.length; i++) {
-            assertTrue(
+            assertEquals(
                     "the decompressed data does not equal the original data decompressed",
-                    orgBuf[i] == outBuf[i]);
+                    orgBuf[i], outBuf[i]);
             // System.out.println(orgBuf[i] + " " + outBuf[i]);
         }
         int r = 0;
@@ -180,7 +180,7 @@ public class GZIPInputStreamTest extends
         }
         assertEquals("Should return -1", -1, gin2.read());
         gin2.close();
-        assertTrue("Incorrectly decompressed", total == test.length);
+        assertEquals("Incorrectly decompressed", test.length, total);
 
         gin2 = new GZIPInputStream(new ByteArrayInputStream(comp), 512);
         total = 0;
@@ -189,7 +189,7 @@ public class GZIPInputStreamTest extends
         }
         assertEquals("Should return -1", -1, gin2.read());
         gin2.close();
-        assertTrue("Incorrectly decompressed", total == test.length);
+        assertEquals("Incorrectly decompressed", test.length, total);
 
         gin2 = new GZIPInputStream(new ByteArrayInputStream(comp), 516);
         total = 0;
@@ -198,7 +198,7 @@ public class GZIPInputStreamTest extends
         }
         assertEquals("Should return -1", -1, gin2.read());
         gin2.close();
-        assertTrue("Incorrectly decompressed", total == test.length);
+        assertEquals("Incorrectly decompressed", test.length, total);
 
         comp[40] = 0;
         gin2 = new GZIPInputStream(new ByteArrayInputStream(comp), 512);

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterInputStreamTest.java
Sat Oct 30 13:39:15 2010
@@ -184,9 +184,9 @@ public class InflaterInputStreamTest ext
 		inflatIP.close();
 
 		for (int j = 0; j < orgBuffer.length; j++) {
-			assertTrue(
+			assertEquals(
 				"original compressed data did not equal decompressed data",
-				buffer[j] == orgBuffer[j]);
+				orgBuffer[j], buffer[j]);
 		}
 	}
 
@@ -433,9 +433,9 @@ public class InflaterInputStreamTest ext
 		inflatIP2.close();
 
 		for (int j = 2; j < orgBuffer.length; j++) {
-			assertTrue(
+			assertEquals(
 				"original compressed data did not equal decompressed data",
-				buffer[j - 2] == orgBuffer[j]);
+				orgBuffer[j], buffer[j - 2]);
 		}
 	}
 

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
Sat Oct 30 13:39:15 2010
@@ -83,9 +83,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < byteArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					byteArray[i] == outPutInf[i]);
+					outPutInf[i], byteArray[i]);
 		}
 		assertEquals("final decompressed data contained more bytes than original - finished()",
 				0, outPutInf[byteArray.length]);
@@ -105,9 +105,9 @@ public class InflaterTest extends junit.
 			Adler32 adl = new Adler32();
 			adl.update(dictionaryArray);
 			long checkSumR = adl.getValue();
-			assertTrue(
+			assertEquals(
 					"the checksum value returned by getAdler() is not the same as the checksum returned
by creating the adler32 instance",
-					checkSumR == inflateDiction.getAdler());
+					inflateDiction.getAdler(), checkSumR);
 		}
 	}
 
@@ -159,9 +159,9 @@ public class InflaterTest extends junit.
 			fail("Input to inflate is invalid or corrupted - getTotalIn");
 		}
 		// System.out.print(deflate.getTotalOut() + " " + inflate.getTotalIn());
-		assertTrue(
+		assertEquals(
 				"the total byte in outPutBuf did not equal the byte returned in getTotalIn",
-				inflate.getTotalIn() == deflate.getTotalOut());
+				deflate.getTotalOut(), inflate.getTotalIn());
 
 		Inflater inflate2 = new Inflater();
 		int offSet = 0;// seems only can start as 0
@@ -178,9 +178,9 @@ public class InflaterTest extends junit.
 			fail("Input to inflate is invalid or corrupted - getTotalIn");
 		}
 		// System.out.print(inflate2.getTotalIn() + " " + length);
-		assertTrue(
+		assertEquals(
 				"total byte dictated by length did not equal byte returned in getTotalIn",
-				inflate2.getTotalIn() == length);
+				length, inflate2.getTotalIn());
 	}
 
 	/**
@@ -217,12 +217,12 @@ public class InflaterTest extends junit.
 			fail("Input to inflate is invalid or corrupted - getTotalIn");
 		}
 
-		assertTrue(
+		assertEquals(
 				"the sum of the bytes returned from inflate does not equal the bytes of getTotalOut()",
-				y == inflate.getTotalOut());
-		assertTrue(
+				inflate.getTotalOut(), y);
+		assertEquals(
 				"the total number of bytes to be compressed does not equal the total bytes decompressed",
-				inflate.getTotalOut() == deflate.getTotalIn());
+				deflate.getTotalIn(), inflate.getTotalOut());
 
 		// testing inflate(byte,int,int)
 		inflate.reset();
@@ -241,12 +241,12 @@ public class InflaterTest extends junit.
 			System.out
 					.println("Input to inflate is invalid or corrupted - getTotalIn");
 		}
-		assertTrue(
+		assertEquals(
 				"the sum of the bytes returned from inflate does not equal the bytes of getTotalOut()",
-				y == inflate.getTotalOut());
-		assertTrue(
+				y, inflate.getTotalOut());
+		assertEquals(
 				"the total number of bytes to be compressed does not equal the total bytes decompressed",
-				inflate.getTotalOut() == deflate.getTotalIn());
+				deflate.getTotalIn(), inflate.getTotalOut());
 	}
 
 	/**
@@ -269,9 +269,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < byteArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					byteArray[i] == outPutInf[i]);
+					byteArray[i], outPutInf[i]);
 		}
 		assertEquals("final decompressed data contained more bytes than original - inflateB",
 				0, outPutInf[byteArray.length]);
@@ -288,12 +288,12 @@ public class InflaterTest extends junit.
 		while (!(defEmpty.finished())) {
 			x += defEmpty.deflate(outPutBuf, x, outPutBuf.length - x);
 		}
-		assertTrue(
+		assertEquals(
 				"the total number of byte from deflate did not equal getTotalOut - inflate(byte)",
-				x == defEmpty.getTotalOut());
-		assertTrue(
+				x, defEmpty.getTotalOut());
+		assertEquals(
 				"the number of input byte from the array did not correspond with getTotalIn - inflate(byte)",
-				defEmpty.getTotalIn() == emptyArray.length);
+				emptyArray.length, defEmpty.getTotalIn());
 		Inflater infEmpty = new Inflater();
 		try {
 			while (!(infEmpty.finished())) {
@@ -306,9 +306,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < emptyArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					emptyArray[i] == outPutInf[i]);
+					emptyArray[i], outPutInf[i]);
 			assertEquals("Final decompressed data does not equal zero",
 					0, outPutInf[i]);
 		}
@@ -373,9 +373,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < byteArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					byteArray[i] == outPutInf[i]);
+					byteArray[i], outPutInf[i]);
 		}
 		assertEquals("final decompressed data contained more bytes than original - inflateB",
 				0, outPutInf[byteArray.length]);
@@ -603,9 +603,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < byteArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					byteArray[i] == outPutInf[i]);
+					byteArray[i], outPutInf[i]);
 		}
 		assertEquals("final decompressed data contained more bytes than original - reset",
 				0, outPutInf[byteArray.length]);
@@ -625,9 +625,9 @@ public class InflaterTest extends junit.
 			fail("Invalid input to be decompressed");
 		}
 		for (int i = 0; i < byteArray.length; i++) {
-			assertTrue(
+			assertEquals(
 					"Final decompressed data does not equal the original data",
-					byteArray[i] == outPutInf[i]);
+					byteArray[i], outPutInf[i]);
 		}
 		assertEquals("final decompressed data contained more bytes than original - reset",
 				0, outPutInf[byteArray.length]);
@@ -711,9 +711,9 @@ public class InflaterTest extends junit.
 		int length = 6;
 		Inflater inflate = new Inflater();
 		inflate.setInput(byteArray, offSet, length);
-		assertTrue(
+		assertEquals(
 				"setInputBII did not deliver the right number of bytes to the input buffer",
-				inflate.getRemaining() == length);
+				length, inflate.getRemaining());
 		// boundary check
 		inflate.reset();
 		int r = 0;

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipEntryTest.java
Sat Oct 30 13:39:15 2010
@@ -120,7 +120,7 @@ public class ZipEntryTest extends junit.
 	 */
 	public void test_getCrc() {
 		// Test for method long java.util.zip.ZipEntry.getCrc()
-		assertTrue("Failed to get Crc", zentry.getCrc() == orgCrc);
+		assertEquals("Failed to get Crc", orgCrc, zentry.getCrc());
 	}
 
 	/**
@@ -133,8 +133,8 @@ public class ZipEntryTest extends junit.
 		byte[] ba = { 'T', 'E', 'S', 'T' };
 		zentry = new ZipEntry("test.tst");
 		zentry.setExtra(ba);
-		assertTrue("Incorrect Extra Information Returned.",
-				zentry.getExtra() == ba);
+		assertEquals("Incorrect Extra Information Returned.",
+				ba, zentry.getExtra());
 	}
 
 	/**
@@ -143,11 +143,11 @@ public class ZipEntryTest extends junit.
 	public void test_getMethod() {
 		// Test for method int java.util.zip.ZipEntry.getMethod()
 		zentry = zfile.getEntry("File1.txt");
-		assertTrue("Incorrect compression method returned",
-				zentry.getMethod() == java.util.zip.ZipEntry.STORED);
+		assertEquals("Incorrect compression method returned",
+				java.util.zip.ZipEntry.STORED, zentry.getMethod());
 		zentry = zfile.getEntry("File3.txt");
-		assertTrue("Incorrect compression method returned",
-				zentry.getMethod() == java.util.zip.ZipEntry.DEFLATED);
+		assertEquals("Incorrect compression method returned",
+				java.util.zip.ZipEntry.DEFLATED, zentry.getMethod());
 		zentry = new ZipEntry("test.tst");
 		assertEquals("Incorrect Method Returned.", -1, zentry.getMethod());
 	}
@@ -166,7 +166,7 @@ public class ZipEntryTest extends junit.
 	 */
 	public void test_getSize() {
 		// Test for method long java.util.zip.ZipEntry.getSize()
-		assertTrue("Incorrect size returned", zentry.getSize() == orgSize);
+		assertEquals("Incorrect size returned", orgSize, zentry.getSize());
 	}
 
 	/**
@@ -174,7 +174,7 @@ public class ZipEntryTest extends junit.
 	 */
 	public void test_getTime() {
 		// Test for method long java.util.zip.ZipEntry.getTime()
-		assertTrue("Failed to get time", zentry.getTime() == orgTime);
+		assertEquals("Failed to get time", orgTime, zentry.getTime());
 	}
 
 	/**
@@ -225,8 +225,8 @@ public class ZipEntryTest extends junit.
 	public void test_setCompressedSizeJ() {
 		// Test for method void java.util.zip.ZipEntry.setCompressedSize(long)
 		zentry.setCompressedSize(orgCompressedSize + 10);
-		assertTrue("Set compressed size failed",
-				zentry.getCompressedSize() == (orgCompressedSize + 10));
+		assertEquals("Set compressed size failed",
+				(orgCompressedSize + 10), zentry.getCompressedSize());
 		zentry.setCompressedSize(0);
 		assertEquals("Set compressed size failed",
 				0, zentry.getCompressedSize());
@@ -234,8 +234,8 @@ public class ZipEntryTest extends junit.
 		assertEquals("Set compressed size failed",
 				-25, zentry.getCompressedSize());
 		zentry.setCompressedSize(4294967296l);
-		assertTrue("Set compressed size failed",
-				zentry.getCompressedSize() == 4294967296l);
+		assertEquals("Set compressed size failed",
+				4294967296l, zentry.getCompressedSize());
 	}
 
 	/**
@@ -244,7 +244,7 @@ public class ZipEntryTest extends junit.
 	public void test_setCrcJ() {
 		// Test for method void java.util.zip.ZipEntry.setCrc(long)
 		zentry.setCrc(orgCrc + 100);
-		assertTrue("Failed to set Crc", zentry.getCrc() == (orgCrc + 100));
+		assertEquals("Failed to set Crc", (orgCrc + 100), zentry.getCrc());
 		zentry.setCrc(0);
 		assertEquals("Failed to set Crc", 0, zentry.getCrc());
 		try {
@@ -311,11 +311,11 @@ public class ZipEntryTest extends junit.
 		// Test for method void java.util.zip.ZipEntry.setMethod(int)
 		zentry = zfile.getEntry("File3.txt");
 		zentry.setMethod(ZipEntry.STORED);
-		assertTrue("Failed to set compression method",
-				zentry.getMethod() == ZipEntry.STORED);
+		assertEquals("Failed to set compression method",
+				ZipEntry.STORED, zentry.getMethod());
 		zentry.setMethod(ZipEntry.DEFLATED);
-		assertTrue("Failed to set compression method",
-				zentry.getMethod() == ZipEntry.DEFLATED);
+		assertEquals("Failed to set compression method",
+				ZipEntry.DEFLATED, zentry.getMethod());
 		try {
 			int error = 1;
 			zentry = new ZipEntry("test.tst");
@@ -331,7 +331,7 @@ public class ZipEntryTest extends junit.
 	public void test_setSizeJ() {
 		// Test for method void java.util.zip.ZipEntry.setSize(long)
 		zentry.setSize(orgSize + 10);
-		assertTrue("Set size failed", zentry.getSize() == (orgSize + 10));
+		assertEquals("Set size failed", (orgSize + 10), zentry.getSize());
 		zentry.setSize(0);
 		assertEquals("Set size failed", 0, zentry.getSize());
 		try {
@@ -357,31 +357,31 @@ public class ZipEntryTest extends junit.
 	public void test_setTimeJ() {
 		// Test for method void java.util.zip.ZipEntry.setTime(long)
 		zentry.setTime(orgTime + 10000);
-		assertTrue("Test 1: Failed to set time: " + zentry.getTime(), zentry
-				.getTime() == (orgTime + 10000));
+		assertEquals("Test 1: Failed to set time: " + zentry.getTime(), (orgTime + 10000), 
+		        zentry.getTime());
 		zentry.setTime(orgTime - 10000);
-		assertTrue("Test 2: Failed to set time: " + zentry.getTime(), zentry
-				.getTime() == (orgTime - 10000));
+		assertEquals("Test 2: Failed to set time: " + zentry.getTime(), (orgTime - 10000), 
+		        zentry.getTime());
 		TimeZone zone = TimeZone.getDefault();
 		try {
 			TimeZone.setDefault(TimeZone.getTimeZone("EST"));
 			zentry.setTime(0);
-			assertTrue("Test 3: Failed to set time: " + zentry.getTime(),
-					zentry.getTime() == 315550800000L);
+			assertEquals("Test 3: Failed to set time: " + zentry.getTime(),
+					315550800000L, zentry.getTime());
 			TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
-			assertTrue("Test 3a: Failed to set time: " + zentry.getTime(),
-					zentry.getTime() == 315532800000L);
+			assertEquals("Test 3a: Failed to set time: " + zentry.getTime(),
+					315532800000L, zentry.getTime());
 			zentry.setTime(0);
 			TimeZone.setDefault(TimeZone.getTimeZone("EST"));
-			assertTrue("Test 3b: Failed to set time: " + zentry.getTime(),
-					zentry.getTime() == 315550800000L);
+			assertEquals("Test 3b: Failed to set time: " + zentry.getTime(),
+					315550800000L, zentry.getTime());
 
 			zentry.setTime(-25);
-			assertTrue("Test 4: Failed to set time: " + zentry.getTime(),
-					zentry.getTime() == 315550800000L);
+			assertEquals("Test 4: Failed to set time: " + zentry.getTime(),
+					315550800000L, zentry.getTime());
 			zentry.setTime(4354837200000L);
-			assertTrue("Test 5: Failed to set time: " + zentry.getTime(),
-					zentry.getTime() == 315550800000L);
+			assertEquals("Test 5: Failed to set time: " + zentry.getTime(),
+					315550800000L, zentry.getTime());
 		} finally {
 			TimeZone.setDefault(zone);
 		}
@@ -411,10 +411,10 @@ public class ZipEntryTest extends junit.
 				.getCompressedSize());
 		assertEquals("ZipEntry Created With Incorrect Comment.", "Testing", zentry2
 				.getComment());
-		assertTrue("ZipEntry Created With Incorrect Crc.",
-				zentry2.getCrc() == orgCrc);
-		assertTrue("ZipEntry Created With Incorrect Time.",
-				zentry2.getTime() == orgTime);
+		assertEquals("ZipEntry Created With Incorrect Crc.",
+				orgCrc, zentry2.getCrc());
+		assertEquals("ZipEntry Created With Incorrect Time.",
+				orgTime, zentry2.getTime());
 	}
 
 	/**
@@ -423,8 +423,8 @@ public class ZipEntryTest extends junit.
 	public void test_clone() {
 		// Test for method java.util.zip.ZipEntry.clone()
 		Object obj = zentry.clone();
-		assertTrue("toString()", obj.toString().equals(zentry.toString()));
-		assertTrue("hashCode()", obj.hashCode() == zentry.hashCode());
+		assertEquals("toString()", zentry.toString(), obj.toString());
+		assertEquals("hashCode()", zentry.hashCode(), obj.hashCode());
 
 		// One constructor
 		ZipEntry zeInput = new ZipEntry("InputZIP");

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipFileTest.java
Sat Oct 30 13:39:15 2010
@@ -155,7 +155,7 @@ public class ZipFileTest extends junit.f
 			++c;
 			enumer.nextElement();
 		}
-		assertTrue("Incorrect number of entries returned: " + c, c == 6);
+		assertEquals("Incorrect number of entries returned: " + c, 6, c);
 
 		Enumeration<? extends ZipEntry> enumeration = zfile.entries();
 		zfile.close();
@@ -255,8 +255,8 @@ public class ZipFileTest extends junit.f
 	 */
 	public void test_getName() {
 		// Test for method java.lang.String java.util.zip.ZipFile.getName()
-		assertTrue("Returned incorrect name: " + zfile.getName(), zfile
-				.getName().equals(tempFileName));
+		assertEquals("Returned incorrect name: " + zfile.getName(), tempFileName,
+		        zfile.getName());
 	}
     
     /**

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipInputStreamTest.java
Sat Oct 30 13:39:15 2010
@@ -191,7 +191,7 @@ public class ZipInputStreamTest extends 
         zentry = zis.getNextEntry();
         zentry = zis.getNextEntry();
         long s = zis.skip(1025);
-        assertTrue("invalid skip: " + s, s == 1025);
+        assertEquals("invalid skip: " + s, 1025, s);
 
         ZipInputStream zis = new ZipInputStream(new ByteArrayInputStream(zipBytes));
         zis.getNextEntry();

Modified: harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java?rev=1029064&r1=1029063&r2=1029064&view=diff
==============================================================================
--- harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
(original)
+++ harmony/enhanced/java/branches/java6/classlib/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ZipOutputStreamTest.java
Sat Oct 30 13:39:15 2010
@@ -109,9 +109,8 @@ public class ZipOutputStreamTest extends
         zis = new ZipInputStream(new ByteArrayInputStream(bos.toByteArray()));
         ZipEntry ze2 = zis.getNextEntry();
         zis.closeEntry();
-        assertTrue("Failed to write correct entry", ze.getName().equals(
-                ze2.getName())
-                && ze.getCrc() == ze2.getCrc());
+        assertEquals("Failed to write correct entry", ze.getName(), ze2.getName());
+        assertEquals("Failed to write correct entry", ze.getCrc(), ze2.getCrc());
         try {
             zos.putNextEntry(ze);
             fail("Entry with incorrect setting failed to throw exception");
@@ -192,8 +191,7 @@ public class ZipOutputStreamTest extends
             count += r;
         }
         zis.closeEntry();
-        assertTrue("Write failed to write correct bytes", new String(b)
-                .equals(data));
+        assertEquals("Write failed to write correct bytes", new String(b), data);
 
         File f = File.createTempFile("testZip", "tst");
         f.deleteOnExit();

Propchange: harmony/enhanced/java/branches/java6/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 13:39:15 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751-941490
-/harmony/enhanced/java/trunk/drlvm:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413
+/harmony/enhanced/java/trunk/drlvm:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413,1027985
 /harmony/enhanced/trunk/drlvm:476395-929252
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/drlvm:292550-476394

Propchange: harmony/enhanced/java/branches/java6/jdktools/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Oct 30 13:39:15 2010
@@ -1,4 +1,4 @@
-/harmony/enhanced/java/trunk/jdktools:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413
+/harmony/enhanced/java/trunk/jdktools:929253-997624,997759,997980,997986,998010,998030,998619,998628,998759,998804,998822,999260,999286,999306,999591,999601,999623,999715-999716,999724,999793,1000005,1000169,1000213,1000229,1000231,1000233,1000240,1000245,1000248,1000265,1000527,1000689,1000696,1000699-1000700,1000705,1000708,1001065,1001080,1001153,1001187,1001490,1001609,1001638,1001652,1001723,1001741,1001744-1001745,1001751,1002080,1002189,1002476,1002480,1002488,1002506,1002511,1002592,1002736,1002971,1002988,1002990,1003089,1003094-1003095,1003109,1003513,1003744,1004471,1004624,1004837,1004906,1004908,1005084,1005391,1005441-1005442,1005648,1005651,1006115,1021745,1022064,1022390,1022493,1022832,1022846,1022963,1024556,1025578,1027390,1027403,1027413,1027985
 /harmony/enhanced/jdktools/trunk:630107-925933
 /harmony/enhanced/trunk/jdktools:476395-929252
 /harmony/enhanced/trunk/working_jdktools:476396-920147



Mime
View raw message