commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r936122 - in /commons/proper/io/trunk/src/test/org/apache/commons/io: comparator/ComparatorAbstractTestCase.java output/StringBuilderWriterTest.java
Date Wed, 21 Apr 2010 00:27:10 GMT
Author: sebb
Date: Wed Apr 21 00:27:09 2010
New Revision: 936122

URL: http://svn.apache.org/viewvc?rev=936122&view=rev
Log:
Oops - bug in r934112. Use assertSame() for Object ==

Modified:
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
    commons/proper/io/trunk/src/test/org/apache/commons/io/output/StringBuilderWriterTest.java

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java?rev=936122&r1=936121&r2=936122&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
Wed Apr 21 00:27:09 2010
@@ -108,9 +108,9 @@ public abstract class ComparatorAbstract
         files[1] = moreFile;
         files[2] = lessFile;
         comparator.sort(files);
-        assertEquals("equal", lessFile, files[0]);
-        assertEquals("less",  equalFile1, files[1]);
-        assertEquals("more",  moreFile, files[2]);
+        assertSame("equal", lessFile, files[0]);
+        assertSame("less",  equalFile1, files[1]);
+        assertSame("more",  moreFile, files[2]);
     }
 
     /**
@@ -122,9 +122,9 @@ public abstract class ComparatorAbstract
         files.add(moreFile);
         files.add(lessFile);
         comparator.sort(files);
-        assertEquals("equal", lessFile, files.get(0));
-        assertEquals("less",  equalFile1, files.get(1));
-        assertEquals("more",  moreFile, files.get(2));
+        assertSame("equal", lessFile, files.get(0));
+        assertSame("less",  equalFile1, files.get(1));
+        assertSame("more",  moreFile, files.get(2));
     }
 
     /**

Modified: commons/proper/io/trunk/src/test/org/apache/commons/io/output/StringBuilderWriterTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/org/apache/commons/io/output/StringBuilderWriterTest.java?rev=936122&r1=936121&r2=936122&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/org/apache/commons/io/output/StringBuilderWriterTest.java
(original)
+++ commons/proper/io/trunk/src/test/org/apache/commons/io/output/StringBuilderWriterTest.java
Wed Apr 21 00:27:09 2010
@@ -49,7 +49,7 @@ public class StringBuilderWriterTest ext
         StringBuilderWriter writer = new StringBuilderWriter(builder);
         writer.append("Bar");
         assertEquals("FooBar", writer.toString());
-        assertEquals(builder, writer.getBuilder());
+        assertSame(builder, writer.getBuilder());
     }
 
     /** Test {@link StringBuilderWriter} constructor. */



Mime
View raw message