You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by gh...@apache.org on 2006/04/12 16:52:10 UTC

svn commit: r393479 - in /incubator/harmony/enhanced/classlib/trunk/modules/luni: make/common/build.xml src/test/java/tests/api/java/io/FileTest.java

Author: gharley
Date: Wed Apr 12 07:52:07 2006
New Revision: 393479

URL: http://svn.apache.org/viewcvs?rev=393479&view=rev
Log:
Renabling tests for java.io.File. Updated test for createNewFile() to check on return for existing directory.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml?rev=393479&r1=393478&r2=393479&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/make/common/build.xml Wed Apr 12 07:52:07 2006
@@ -81,6 +81,7 @@
 
 			<classpath>
 				<pathelement path="${hy.luni.bin.test}" />
+				<pathelement path="../../../../build/tests" />
 			</classpath>
 
 			<formatter type="xml" />
@@ -92,7 +93,6 @@
 					<exclude name="**/BufferedReaderTest.java" />
 					<exclude name="**/BufferedWriterTest.java" />
 					<exclude name="**/FileInputStreamTest.java" />
-					<exclude name="**/FileTest.java" />
 					<exclude name="**/FilterInputStreamTest.java" />
 					<exclude name="**/InputStreamReaderTest.java" />
 					<exclude name="**/NotSerializableExceptionTest.java" />

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java?rev=393479&r1=393478&r2=393479&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/io/FileTest.java Wed Apr 12 07:52:07 2006
@@ -412,9 +412,9 @@
 
 			f1 = new File(base);
 			try {
-				f1.createNewFile();
-				fail("IOException expected in createNewFile with file is existing directory");
+				assertFalse(f1.createNewFile());
 			} catch (IOException innerE) {
+                fail("Incorrectly threw IOException from createNewFile when file is existing directory");
 			}
 		} catch (IOException e) {
 			fail("Unexpected IOException During Test: " + e);