History log of /libcore/luni/src/test/java/libcore/java/io/FileOutputStreamTest.java
Revision Date Author Comments
b1f55cb6f95928be969a8fe5c7447e13f14d0a68 19-Jul-2011 Elliott Hughes <enh@google.com> Fix FileInputStream/FileOutputStream on unowned FileDescriptors.

We were relying on the fd being invalid to prevent us from performing
activity on a closed stream. Unfortunately, this didn't work with our
clever scheme to avoid having to treat the two cases separately.

Go back to a simple scheme with one FileDescriptor and a boolean that
tells us whether or not we should close it. If we don't close it, we
switch it out for an invalid FileDescriptor so we won't continue to
act on the unowned FileDescriptor.

Bug: 4361076
Change-Id: I1851926fd2847ea63d91a8e0680a7430ecb16453
67e5c528c6c81210e7ede35f7c137050e5c346b1 23-May-2011 Elliott Hughes <enh@google.com> Move the non-upstream part of OldFileOutputStreamTest into FileOutputStreamTest.

(And remove the duplicated bits.)

Change-Id: I2a12d5870931a3867d971ab162e576b6f65168b4
73298fc8f21a2440b4848912e95a072713b93a1a 07-Apr-2011 Elliott Hughes <enh@google.com> Fix a typo in FileOutputStream.

The matching code in FileInputStream was correct, but I've added tests for
both. Note that the RI does not pass these tests; this was always an Android
extension, one which we'd apparently never written a test for.

Change-Id: I04d0f63839f07e8ff4ad7b3d54a31b0c0955f8d1