harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qi...@apache.org
Subject svn commit: r720754 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java
Date Wed, 26 Nov 2008 06:57:19 GMT
Author: qiuxx
Date: Tue Nov 25 22:57:19 2008
New Revision: 720754

URL: http://svn.apache.org/viewvc?rev=720754&view=rev
Log:
Apply for HARMONY-6011,([Classlib] [luni] Add test case to RandomAccessFile)

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java?rev=720754&r1=720753&r2=720754&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java
Tue Nov 25 22:57:19 2008
@@ -57,6 +57,18 @@
         assertEquals("Incorrect int read/written", 20, raf.read());
         raf.close();
         
+        raf = new java.io.RandomAccessFile(f, "rwd");
+        raf.write(20);
+        raf.seek(0);
+        assertEquals("Incorrect int read/written", 20, raf.read());
+        raf.close();
+
+        raf = new java.io.RandomAccessFile(f, "rws");
+        raf.write(20);
+        raf.seek(0);
+        assertEquals("Incorrect int read/written", 20, raf.read());
+        raf.close();
+        
         // Regression for HARMONY-50
         File f = File.createTempFile("xxx", "yyy");
         f.deleteOnExit();
@@ -80,6 +92,14 @@
         RandomAccessFile raf = new java.io.RandomAccessFile(fileName, "rw");
         raf.write("Test".getBytes(), 0, 4);
         raf.close();
+        
+        raf = new java.io.RandomAccessFile(fileName, "rwd");
+        raf.write("Test".getBytes(), 0, 4);
+        raf.close();
+
+        raf = new java.io.RandomAccessFile(fileName, "rws");
+        raf.write("Test".getBytes(), 0, 4);
+        raf.close();
     }
 
     /**



Mime
View raw message