harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r791786 - /harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java
Date Tue, 07 Jul 2009 10:35:21 GMT
Author: odeakin
Date: Tue Jul  7 10:35:20 2009
New Revision: 791786

URL: http://svn.apache.org/viewvc?rev=791786&view=rev
Log:
Ensure this test behaves correctly on non-ASCII systems (e.g. zOS).

Modified:
    harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java?rev=791786&r1=791785&r2=791786&view=diff
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/DeflaterInputStreamTest.java
Tue Jul  7 10:35:20 2009
@@ -131,7 +131,7 @@
         assertEquals(23, dis.read(buf1, 0, 256));
         dis = new DeflaterInputStream(is);
         assertEquals(8, dis.read(buf2, 0, 256));
-        is = new ByteArrayInputStream(testStr.getBytes());
+        is = new ByteArrayInputStream(testStr.getBytes("UTF-8"));
         dis = new DeflaterInputStream(is);
         assertEquals(1, dis.available());
         assertEquals(120, dis.read());
@@ -254,7 +254,7 @@
         assertEquals(1, dis.available());
         dis.skip(1);
         assertEquals(0, dis.available());
-        is = new ByteArrayInputStream(testStr.getBytes());
+        is = new ByteArrayInputStream(testStr.getBytes("UTF-8"));
         dis = new DeflaterInputStream(is);
         assertEquals(1, dis.available());
         dis.skip(56);
@@ -283,7 +283,7 @@
             // expected
         }
 
-        is = new ByteArrayInputStream(testStr.getBytes());
+        is = new ByteArrayInputStream(testStr.getBytes("UTF-8"));
         dis = new DeflaterInputStream(is);
         assertEquals(23, dis.skip(Long.MAX_VALUE));
         assertEquals(0, dis.available());
@@ -367,7 +367,7 @@
     @Override
     protected void setUp() throws Exception {
         super.setUp();
-        is = new ByteArrayInputStream(testStr.getBytes());
+        is = new ByteArrayInputStream(testStr.getBytes("UTF-8"));
     }
 
     @Override



Mime
View raw message