harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r420749 - in /incubator/harmony/enhanced/classlib/trunk: modules/archive/ modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ support/src/test/java/tests/resources/GZIPInputStream/
Date Tue, 11 Jul 2006 07:36:55 GMT
Author: hindessm
Date: Tue Jul 11 00:36:54 2006
New Revision: 420749

URL: http://svn.apache.org/viewvc?rev=420749&view=rev
Log:
Applied changes for "[#HARMONY-823] [classlib][archive] incorrect data for the GZIPInputStreamTest".

Added:
    incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt.gz
  (with props)
Removed:
    incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/build.xml?rev=420749&r1=420748&r2=420749&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/build.xml Tue Jul 11 00:36:54
2006
@@ -210,8 +210,7 @@
 
                 <fileset dir="${hy.archive.src.test.java}">
                     <include name="**/*Test.java"/>
-                    <exclude name="org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java"/>
-                	<exclude name="org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java"/>
+                	<exclude name="org/apache/harmony/archive/tests/java/util/jar/JarOutputStreamTest.java"
/>
                 </fileset>
             </batchtest>
         </junit>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java?rev=420749&r1=420748&r2=420749&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/GZIPInputStreamTest.java
Tue Jul 11 00:36:54 2006
@@ -54,9 +54,9 @@
 		// test method java.util.zip.GZIPInputStream.constructor
 		try {
 			Support_Resources.copyFile(resources, "GZIPInputStream",
-					"hyts_gInput.txt");
+					"hyts_gInput.txt.gz");
 			final URL gInput = new File(resources.toString()
-					+ "/GZIPInputStream/hyts_gInput.txt").toURL();
+					+ "/GZIPInputStream/hyts_gInput.txt.gz").toURL();
 			TestGZIPInputStream inGZIP = new TestGZIPInputStream(gInput
 					.openConnection().getInputStream());
 			assertNotNull("the constructor for GZIPInputStream is null",
@@ -78,9 +78,9 @@
 		// test method java.util.zip.GZIPInputStream.constructorI
 		try {
 			Support_Resources.copyFile(resources, "GZIPInputStream",
-					"hyts_gInput.txt");
+					"hyts_gInput.txt.gz");
 			final URL gInput = new File(resources.toString()
-					+ "/GZIPInputStream/hyts_gInput.txt").toURL();
+					+ "/GZIPInputStream/hyts_gInput.txt.gz").toURL();
 			TestGZIPInputStream inGZIP = new TestGZIPInputStream(gInput
 					.openConnection().getInputStream(), 200);
 			assertNotNull("the constructor for GZIPInputStream is null",
@@ -99,24 +99,24 @@
 	 */
 	public void test_read$BII() {
 		// test method java.util.zip.GZIPInputStream.readBII
-		byte orgBuf[] = { 3, 5, 2, 'r', 'g', 'e', 'f', 'd', 'e', 'w' };
+		byte orgBuf[] = { '3', '5', '2', 'r', 'g', 'e', 'f', 'd', 'e', 'w' };
 		byte outBuf[] = new byte[100];
 		try {
 			int result = 0;
 			Support_Resources.copyFile(resources, "GZIPInputStream",
-					"hyts_gInput.txt");
+					"hyts_gInput.txt.gz");
 			String resPath = resources.toString();
 			if (resPath.charAt(0) == '/' || resPath.charAt(0) == '\\')
 				resPath = resPath.substring(1);
 			final URL gInput = new URL("file:/" + resPath
-					+ "/GZIPInputStream/hyts_gInput.txt");
+					+ "/GZIPInputStream/hyts_gInput.txt.gz");
 			TestGZIPInputStream inGZIP = new TestGZIPInputStream(gInput
 					.openConnection().getInputStream());
 			while (!(inGZIP.endofInput())) {
 				result += inGZIP.read(outBuf, result, outBuf.length - result);
 			}
 			assertEquals("the checkSum value of the compressed and decompressed data does not equal",
-					3097700292L, inGZIP.getChecksum().getValue());
+					2074883667L, inGZIP.getChecksum().getValue());
 			for (int i = 0; i < orgBuf.length; i++) {
 				assertTrue(
 						"the decompressed data does not equal the orginal data decompressed",
@@ -201,19 +201,19 @@
 		try {
 			int result = 0;
 			Support_Resources.copyFile(resources, "GZIPInputStream",
-					"hyts_gInput.txt");
+					"hyts_gInput.txt.gz");
 			String resPath = resources.toString();
 			if (resPath.charAt(0) == '/' || resPath.charAt(0) == '\\')
 				resPath = resPath.substring(1);
 			final URL gInput = new URL("file:/" + resPath
-					+ "/GZIPInputStream/hyts_gInput.txt");
+					+ "/GZIPInputStream/hyts_gInput.txt.gz");
 			TestGZIPInputStream inGZIP = new TestGZIPInputStream(gInput
 					.openConnection().getInputStream());
 			while (!(inGZIP.endofInput())) {
 				result += inGZIP.read(outBuf, result, outBuf.length - result);
 			}
 			assertEquals("the checkSum value of the compressed and decompressed data does not equal",
-					3097700292L, inGZIP.getChecksum().getValue());
+					2074883667L, inGZIP.getChecksum().getValue());
 			inGZIP.close();
 			int r = 0;
 			try {

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt.gz
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt.gz?rev=420749&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt.gz
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream



Mime
View raw message