harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhouke...@apache.org
Subject svn commit: r796195 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java
Date Tue, 21 Jul 2009 09:04:18 GMT
Author: zhoukevin
Date: Tue Jul 21 09:04:18 2009
New Revision: 796195

URL: http://svn.apache.org/viewvc?rev=796195&view=rev
Log:
Fix test failures of FilterInputStreamTest for z/OS

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java?rev=796195&r1=796194&r2=796195&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FilterInputStreamTest.java
Tue Jul 21 09:04:18 2009
@@ -92,7 +92,7 @@
         byte[] buf1 = new byte[100];
         is.read(buf1);
         assertTrue("Failed to read correct data", new String(buf1, 0,
-                buf1.length).equals(fileString.substring(0, 100)));
+                buf1.length, "UTF-8").equals(fileString.substring(0, 100)));
     }
 
     /**
@@ -104,7 +104,7 @@
         is.mark(1000);
         is.read(buf1, 0, buf1.length);
         assertTrue("Failed to read correct data", new String(buf1, 0,
-                buf1.length).equals(fileString.substring(3000, 3100)));
+                buf1.length, "UTF-8").equals(fileString.substring(3000, 3100)));
     }
 
     /**
@@ -127,7 +127,7 @@
         is.skip(1000);
         is.read(buf1, 0, buf1.length);
         assertTrue("Failed to skip to correct position", new String(buf1, 0,
-                buf1.length).equals(fileString.substring(1000, 1010)));
+                buf1.length, "UTF-8").equals(fileString.substring(1000, 1010)));
     }
 
     /**
@@ -146,7 +146,7 @@
                     + separator, "input.tst");
         }
         java.io.OutputStream fos = new java.io.FileOutputStream(fileName);
-        fos.write(fileString.getBytes());
+        fos.write(fileString.getBytes("UTF-8"));
         fos.close();
         is = new MyFilterInputStream(new java.io.FileInputStream(fileName));
     }



Mime
View raw message