commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r896986 - in /commons/proper/io/trunk/src/test/org/apache/commons/io: CopyUtilsTest.java IOUtilsCopyTestCase.java input/SwappedDataInputStreamTest.java output/DeferredFileOutputStreamTest.java
Date Thu, 07 Jan 2010 19:57:44 GMT
Author: sebb
Date: Thu Jan  7 19:57:43 2010
New Revision: 896986

URL: http://svn.apache.org/viewvc?rev=896986&view=rev
Log:
Drop or make use of variables returned by method calls

Modified:
    commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/output/DeferredFileOutputStreamTest.java

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java?rev=896986&r1=896985&r2=896986&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/CopyUtilsTest.java Thu Jan  7 19:57:43
2010
@@ -117,6 +117,7 @@
         assertTrue("Not all bytes were read", in.available() == 0);
         assertEquals("Sizes differ", inData.length, baout.size());
         assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
+        assertEquals(inData.length, count);
     }
 
     public void testCopy_inputStreamToWriter() throws Exception {

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java?rev=896986&r1=896985&r2=896986&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java (original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/IOUtilsCopyTestCase.java Thu Jan
 7 19:57:43 2010
@@ -99,6 +99,7 @@
         assertTrue("Not all bytes were read", in.available() == 0);
         assertEquals("Sizes differ", inData.length, baout.size());
         assertTrue("Content differs", Arrays.equals(inData, baout.toByteArray()));
+        assertEquals(inData.length,count);
     }
 
     public void testCopy_inputStreamToOutputStream_nullIn() throws Exception {

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java?rev=896986&r1=896985&r2=896986&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/input/SwappedDataInputStreamTest.java
Thu Jan  7 19:57:43 2010
@@ -94,7 +94,7 @@
 
     public void testReadLine() throws IOException {
         try {
-            String unexpected = this.sdis.readLine();
+            this.sdis.readLine();
             fail("readLine should be unsupported. ");
         } catch(UnsupportedOperationException uoe) {
         }
@@ -118,7 +118,7 @@
 
     public void testReadUTF() throws IOException {
         try {
-            String unexpected = this.sdis.readUTF();
+            this.sdis.readUTF();
             fail("readUTF should be unsupported. ");
         } catch(UnsupportedOperationException uoe) {
         }

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/output/DeferredFileOutputStreamTest.java?rev=896986&r1=896985&r2=896986&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
Thu Jan  7 19:57:43 2010
@@ -334,8 +334,7 @@
         File tempDir  = new File(".");
         try
         {
-            DeferredFileOutputStream dfos =
-                new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir);
+            new DeferredFileOutputStream(testBytes.length - 5, prefix, suffix, tempDir);
             fail("Expected IllegalArgumentException ");
         }
         catch (IllegalArgumentException e) {



Mime
View raw message