harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r611763 [2/2] - in /harmony/enhanced/classlib/trunk/modules/luni/src/test: api/common/org/apache/harmony/luni/tests/java/io/ api/common/tests/api/java/io/ resources/org/apache/harmony/luni/tests/java/io/ resources/serialization/org/apache/h...
Date Mon, 14 Jan 2008 10:59:59 GMT
Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectStreamFieldTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectStreamFieldTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectStreamFieldTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/ObjectStreamFieldTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/ObjectStreamFieldTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OpenRandomFileTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OpenRandomFileTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OpenRandomFileTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OpenRandomFileTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OpenRandomFileTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OpenRandomFileTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OpenRandomFileTest.java Mon Jan 14 02:59:54 2008
@@ -14,7 +14,7 @@
  * limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.File;
 import java.io.FileOutputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OutputStreamWriterTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OutputStreamWriterTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/OutputStreamWriterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/OutputStreamWriterTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -648,7 +648,33 @@
 			assertEquals("Returned incorrect encoding", 
 					"8859_1", osw.getEncoding());
 		}
-	}
+
+        OutputStreamWriter out = null;
+        try {
+            out = new OutputStreamWriter(new ByteArrayOutputStream(),
+                    "UTF-16BE");
+        } catch (UnsupportedEncodingException e) {
+            fail("Should not throw UnsupportedEncodingException");
+        }
+        try {
+            out.close();
+        } catch (IOException e) {
+            fail("Should not throw IOException");
+        }
+        String result = out.getEncoding();
+        assertNull(result);
+
+        
+        out = null;
+        try {
+            out = new OutputStreamWriter(new ByteArrayOutputStream(),
+                    "UTF-16BE");
+        } catch (UnsupportedEncodingException e) {
+            // ok
+        }
+        result = out.getEncoding();
+        assertEquals("UnicodeBigUnmarked", result);
+    }
 
 	/**
 	 * @tests java.io.OutputStreamWriter#write(char[], int, int)

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedInputStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedInputStreamTest.java Mon Jan 14 02:59:54 2008
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.PipedInputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedOutputStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedOutputStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedOutputStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedOutputStreamTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.PipedInputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedReaderTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedReaderTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedReaderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedReaderTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.PipedReader;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedWriterTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedWriterTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PipedWriterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PipedWriterTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.PipedReader;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintStreamTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintWriterTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintWriterTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintWriterTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintWriterTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintWriterTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PrintWriterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PrintWriterTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.BufferedReader;
 import java.io.ByteArrayInputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackInputStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackInputStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackInputStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackInputStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackInputStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackInputStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackInputStreamTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;
@@ -27,22 +27,47 @@
 
 	public String fileString = "Test_All_Tests\nTest_java_io_BufferedInputStream\nTest_java_io_BufferedOutputStream\nTest_java_io_ByteArrayInputStream\nTest_java_io_ByteArrayOutputStream\nTest_java_io_DataInputStream\nTest_java_io_File\nTest_java_io_FileDescriptor\nTest_java_io_FileInputStream\nTest_java_io_FileNotFoundException\nTest_java_io_FileOutputStream\nTest_java_io_FilterInputStream\nTest_java_io_FilterOutputStream\nTest_java_io_InputStream\nTest_java_io_IOException\nTest_java_io_OutputStream\nTest_java_io_PrintStream\nTest_java_io_RandomAccessFile\nTest_java_io_SyncFailedException\nTest_java_lang_AbstractMethodError\nTest_java_lang_ArithmeticException\nTest_java_lang_ArrayIndexOutOfBoundsException\nTest_java_lang_ArrayStoreException\nTest_java_lang_Boolean\nTest_java_lang_Byte\nTest_java_lang_Character\nTest_java_lang_Class\nTest_java_lang_ClassCastException\nTest_java_lang_ClassCircularityError\nTest_java_lang_ClassFormatError\nTest_java_lang_ClassLoader\nTest_java_la
 ng_ClassNotFoundException\nTest_java_lang_CloneNotSupportedException\nTest_java_lang_Double\nTest_java_lang_Error\nTest_java_lang_Exception\nTest_java_lang_ExceptionInInitializerError\nTest_java_lang_Float\nTest_java_lang_IllegalAccessError\nTest_java_lang_IllegalAccessException\nTest_java_lang_IllegalArgumentException\nTest_java_lang_IllegalMonitorStateException\nTest_java_lang_IllegalThreadStateException\nTest_java_lang_IncompatibleClassChangeError\nTest_java_lang_IndexOutOfBoundsException\nTest_java_lang_InstantiationError\nTest_java_lang_InstantiationException\nTest_java_lang_Integer\nTest_java_lang_InternalError\nTest_java_lang_InterruptedException\nTest_java_lang_LinkageError\nTest_java_lang_Long\nTest_java_lang_Math\nTest_java_lang_NegativeArraySizeException\nTest_java_lang_NoClassDefFoundError\nTest_java_lang_NoSuchFieldError\nTest_java_lang_NoSuchMethodError\nTest_java_lang_NullPointerException\nTest_java_lang_Number\nTest_java_lang_NumberFormatException\nTest_java_
 lang_Object\nTest_java_lang_OutOfMemoryError\nTest_java_lang_RuntimeException\nTest_java_lang_SecurityManager\nTest_java_lang_Short\nTest_java_lang_StackOverflowError\nTest_java_lang_String\nTest_java_lang_StringBuffer\nTest_java_lang_StringIndexOutOfBoundsException\nTest_java_lang_System\nTest_java_lang_Thread\nTest_java_lang_ThreadDeath\nTest_java_lang_ThreadGroup\nTest_java_lang_Throwable\nTest_java_lang_UnknownError\nTest_java_lang_UnsatisfiedLinkError\nTest_java_lang_VerifyError\nTest_java_lang_VirtualMachineError\nTest_java_lang_vm_Image\nTest_java_lang_vm_MemorySegment\nTest_java_lang_vm_ROMStoreException\nTest_java_lang_vm_VM\nTest_java_lang_Void\nTest_java_net_BindException\nTest_java_net_ConnectException\nTest_java_net_DatagramPacket\nTest_java_net_DatagramSocket\nTest_java_net_DatagramSocketImpl\nTest_java_net_InetAddress\nTest_java_net_NoRouteToHostException\nTest_java_net_PlainDatagramSocketImpl\nTest_java_net_PlainSocketImpl\nTest_java_net_Socket\nTest_java_net
 _SocketException\nTest_java_net_SocketImpl\nTest_java_net_SocketInputStream\nTest_java_net_SocketOutputStream\nTest_java_net_UnknownHostException\nTest_java_util_ArrayEnumerator\nTest_java_util_Date\nTest_java_util_EventObject\nTest_java_util_HashEnumerator\nTest_java_util_Hashtable\nTest_java_util_Properties\nTest_java_util_ResourceBundle\nTest_java_util_tm\nTest_java_util_Vector\n";
 
+    public void test_reset() {
+        PushbackInputStream pb = new PushbackInputStream(
+                new ByteArrayInputStream(new byte[] { 0 }), 2);
+        try {
+            pb.reset();
+            fail("Should throw IOException");
+        } catch (IOException e) {
+            // expected
+        }
+    }
+
+    public void test_mark() {
+        PushbackInputStream pb = new PushbackInputStream(
+                new ByteArrayInputStream(new byte[] { 0 }), 2);
+        pb.mark(Integer.MAX_VALUE);
+        pb.mark(0);
+        pb.mark(-1);
+        pb.mark(Integer.MIN_VALUE);
+    }
+
+
 	/**
 	 * @tests java.io.PushbackInputStream#PushbackInputStream(java.io.InputStream)
 	 */
 	public void test_ConstructorLjava_io_InputStream() {
-		// Test for method java.io.PushbackInputStream(java.io.InputStream)
+        try {
+            PushbackInputStream str = new PushbackInputStream(null);
+            str.read();
+            fail("Expected IOException");
+        } catch (IOException e) {
+            // Expected
+        }
+    
 		try {
 			pis = new PushbackInputStream(new ByteArrayInputStream("Hello"
 					.getBytes()));
 			pis.unread("He".getBytes());
+		     fail("Failed to throw exception on unread when buffer full");
 		} catch (IOException e) {
-			// Correct
-			// Pushback buffer should be full
-			return;
-
+		    // Expected
 		}
-		fail("Failed to throw exception on unread when buffer full");
 	}
 
 	/**
@@ -64,6 +89,19 @@
 		fail("Failed to throw exception on unread when buffer full");
 	}
 
+    /*
+     * @tests java.io.PushBackInputStream(InputStream, int)
+     */
+    public void test_ConstructorLjava_io_InputStreamL() {
+        try {
+            PushbackInputStream str = new PushbackInputStream(null, 1);
+            str.read();
+            fail("Expected IOException");
+        } catch (IOException e) {
+            // Expected
+        }
+    }
+
 	/**
 	 * @tests java.io.PushbackInputStream#available()
 	 */
@@ -154,21 +192,27 @@
 	/**
 	 * @tests java.io.PushbackInputStream#unread(byte[], int, int)
 	 */
-	public void test_unread$BII() {
+	public void test_unread$BII() throws IOException {
 		// Test for method void java.io.PushbackInputStream.unread(byte [], int,
 		// int)
-		try {
-			byte[] buf = new byte[100];
-			pis.read(buf, 0, buf.length);
-			assertTrue("Incorrect bytes read", new String(buf)
-					.equals(fileString.substring(0, 100)));
-			pis.unread(buf, 50, 50);
-			pis.read(buf, 0, 50);
-			assertTrue("Failed to unread bytes", new String(buf, 0, 50)
-					.equals(fileString.substring(50, 100)));
-		} catch (IOException e) {
-			fail("IOException during unread test : " + e.getMessage());
-		}
+		byte[] buf = new byte[100];
+		pis.read(buf, 0, buf.length);
+		assertTrue("Incorrect bytes read", new String(buf)
+				.equals(fileString.substring(0, 100)));
+		pis.unread(buf, 50, 50);
+		pis.read(buf, 0, 50);
+		assertTrue("Failed to unread bytes", new String(buf, 0, 50)
+				.equals(fileString.substring(50, 100)));
+		
+        // Regression for HARMONY-49
+        try {
+            PushbackInputStream pb = new PushbackInputStream(
+                    new ByteArrayInputStream(new byte[] { 0 }), 2);
+            pb.unread(new byte[1], 0, 5);
+            fail("Assert 0: should throw IOE");
+        } catch (IOException e) {
+            // expected
+        }
 	}
 
 	/**

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackReaderTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackReaderTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackReaderTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackReaderTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackReaderTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/PushbackReaderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/PushbackReaderTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.CharArrayReader;
 import java.io.FilterReader;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/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?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/RandomAccessFileTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/RandomAccessFileTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/RandomAccessFileTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.EOFException;
 import java.io.File;
@@ -55,6 +55,17 @@
         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();
+        raf = new RandomAccessFile(f, "rws");
+        raf.close();
+
+        f = File.createTempFile("xxx", "yyy");
+        f.deleteOnExit();
+        raf = new RandomAccessFile(f, "rwd");
         raf.close();
     }
 

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SequenceInputStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SequenceInputStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SequenceInputStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SequenceInputStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SequenceInputStreamTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.IOException;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializablePermissionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializablePermissionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializablePermissionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializablePermissionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializablePermissionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializablePermissionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializablePermissionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.SerializablePermission;
 

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest1.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest1.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest1.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest1.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest1.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest1.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest1.java Mon Jan 14 02:59:54 2008
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.NotSerializableException;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest2.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest2.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest2.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest2.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest2.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest2.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest2.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -34,6 +34,7 @@
 import java.util.Arrays;
 import java.util.Date;
 import java.util.Locale;
+
 
 @SuppressWarnings( { "serial", "unused" })
 public class SerializationStressTest2 extends SerializationStressTest {

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest3.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest3.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest3.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest3.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest3.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest3.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest3.java Mon Jan 14 02:59:54 2008
@@ -14,7 +14,7 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
@@ -35,6 +35,7 @@
 import java.util.PropertyPermission;
 import java.util.TimeZone;
 import java.util.Vector;
+
 
 @SuppressWarnings( { "serial", "unused" })
 public class SerializationStressTest3 extends SerializationStressTest {

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest4.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest4.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest4.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest4.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest4.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest4.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest4.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.File;
 import java.io.FilePermission;
@@ -33,6 +33,7 @@
 import java.text.MessageFormat;
 import java.text.NumberFormat;
 import java.util.*;
+
 
 
 import tests.support.Support_Configuration;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest5.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest5.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest5.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest5.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest5.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SerializationStressTest5.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SerializationStressTest5.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.File;
 import java.io.FileInputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamCorruptedExceptionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamCorruptedExceptionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamCorruptedExceptionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamCorruptedExceptionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamCorruptedExceptionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamCorruptedExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamCorruptedExceptionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.ObjectInputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamTokenizerTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamTokenizerTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamTokenizerTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamTokenizerTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamTokenizerTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StreamTokenizerTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StreamTokenizerTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayInputStream;
 import java.io.CharArrayReader;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringBufferInputStreamTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringBufferInputStreamTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringBufferInputStreamTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringBufferInputStreamTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringBufferInputStreamTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringBufferInputStreamTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringBufferInputStreamTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.StringBufferInputStream;
 

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringReaderTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringReaderTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringReaderTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringReaderTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringReaderTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringReaderTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringReaderTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.StringReader;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringWriterTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringWriterTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/StringWriterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/StringWriterTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.StringWriter;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SyncFailedExceptionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SyncFailedExceptionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SyncFailedExceptionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SyncFailedExceptionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SyncFailedExceptionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/SyncFailedExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/SyncFailedExceptionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.File;
 import java.io.FileDescriptor;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UTFDataFormatExceptionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UTFDataFormatExceptionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UTFDataFormatExceptionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UTFDataFormatExceptionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UTFDataFormatExceptionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UTFDataFormatExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UTFDataFormatExceptionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UnsupportedEncodingExceptionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UnsupportedEncodingExceptionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UnsupportedEncodingExceptionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UnsupportedEncodingExceptionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UnsupportedEncodingExceptionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/UnsupportedEncodingExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/UnsupportedEncodingExceptionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.ByteArrayOutputStream;
 import java.io.OutputStreamWriter;

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriteAbortedExceptionTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriteAbortedExceptionTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriteAbortedExceptionTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriteAbortedExceptionTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriteAbortedExceptionTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriteAbortedExceptionTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriteAbortedExceptionTest.java Mon Jan 14 02:59:54 2008
@@ -15,7 +15,7 @@
  *  limitations under the License.
  */
 
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.WriteAbortedException;
 

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriterTest.java (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriterTest.java)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriterTest.java?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriterTest.java&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriterTest.java&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/tests/api/java/io/WriterTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/WriterTest.java Mon Jan 14 02:59:54 2008
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package tests.api.java.io;
+package org.apache.harmony.luni.tests.java.io;
 
 import java.io.IOException;
 import java.io.Writer;
@@ -59,6 +59,46 @@
 
     }
 
+
+
+    /**
+     * @tests java.io.Writer#write(String)
+     */
+    public void test_writeLjava_lang_String() throws IOException {
+        // Regression for HARMONY-51
+        Object lock = new Object();
+        Writer wr = new MockLockWriter(lock);
+        // FIXME This test should be added to the exclusion list until
+        // Thread.holdsLock works on IBM VME
+//      wr.write("Some string");
+        wr.close();
+    }
+
+    class MockLockWriter extends Writer {
+        final Object myLock;
+
+        MockLockWriter(Object lock) {
+            super(lock);
+            myLock = lock;
+        }
+
+        @Override
+        public synchronized void close() throws IOException {
+            // do nothing
+        }
+
+        @Override
+        public synchronized void flush() throws IOException {
+            // do nothing
+        }
+
+        @Override
+        public void write(char[] arg0, int arg1, int arg2) throws IOException {
+            assertTrue(Thread.holdsLock(myLock));
+        }
+    }
+
+    
     class MockWriter extends Writer {
         private char[] contents;
 

Added: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile-utf8.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile-utf8.txt?rev=611763&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile-utf8.txt (added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile-utf8.txt Mon Jan 14 02:59:54 2008
@@ -0,0 +1 @@
+This is a test message with Unicode character. 中国 is China's name in Chinese
\ No newline at end of file

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile-utf8.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Added: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile.txt
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile.txt?rev=611763&view=auto
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile.txt (added)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile.txt Mon Jan 14 02:59:54 2008
@@ -0,0 +1 @@
+This is a test message with Unicode character. Öйú is China's name in Chinese
\ No newline at end of file

Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/org/apache/harmony/luni/tests/java/io/testfile.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_integers.ser (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/tests/api/java/io/test_array_integers.ser)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_integers.ser?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_integers.ser&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/tests/api/java/io/test_array_integers.ser&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
Binary files - no diff available.

Copied: harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_strings.ser (from r611127, harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/tests/api/java/io/test_array_strings.ser)
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_strings.ser?p2=harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/serialization/org/apache/harmony/luni/tests/java/io/test_array_strings.ser&p1=harmony/enhanced/classlib/trunk/modules/luni/src/test/resources/tests/api/java/io/test_array_strings.ser&r1=611127&r2=611763&rev=611763&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message