commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1347785 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
Date Thu, 07 Jun 2012 20:48:02 GMT
Author: sebb
Date: Thu Jun  7 20:48:01 2012
New Revision: 1347785

URL: http://svn.apache.org/viewvc?rev=1347785&view=rev
Log:
Add empty array test

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java?rev=1347785&r1=1347784&r2=1347785&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java (original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java Thu
Jun  7 20:48:01 2012
@@ -467,6 +467,13 @@ public class FileUtilsTestCase extends F
         assertEquals(0, files.length);
     }
 
+    public void testToFiles3a() throws Exception {
+        URL[] urls = new URL[0]; // empty array
+        File[] files = FileUtils.toFiles(urls);
+        
+        assertEquals(0, files.length);
+    }
+
     public void testToFiles4() throws Exception {
         URL[] urls = new URL[] {
             new URL("file", null, "file1.txt"),
@@ -519,6 +526,13 @@ public class FileUtilsTestCase extends F
 //        assertEquals(0, urls.length);
 //    }
 
+    public void testToURLs3a() throws Exception {
+        File[] files = new File[0]; // empty array
+        URL[] urls = FileUtils.toURLs(files);
+        
+        assertEquals(0, urls.length);
+    }
+
     // contentEquals
 
     public void testContentEquals() throws Exception {



Mime
View raw message