commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r933994 - /commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.java
Date Wed, 14 Apr 2010 15:51:37 GMT
Author: sebb
Date: Wed Apr 14 15:51:37 2010
New Revision: 933994

URL: http://svn.apache.org/viewvc?rev=933994&view=rev
Log:
A bit more info if the test fails

Modified:
    commons/proper/io/trunk/src/test/org/apache/commons/io/comparator/ComparatorAbstractTestCase.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=933994&r1=933993&r2=933994&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 14 15:51:37 2010
@@ -78,7 +78,7 @@ public abstract class ComparatorAbstract
      * Test the comparator.
      */
     public void testComparator() {
-        assertTrue("equal", comparator.compare(equalFile1, equalFile2) == 0);
+        assertEquals("equal", 0, comparator.compare(equalFile1, equalFile2));
         assertTrue("less",  comparator.compare(lessFile, moreFile) < 0);
         assertTrue("more",  comparator.compare(moreFile, lessFile) > 0);
     }
@@ -87,7 +87,7 @@ public abstract class ComparatorAbstract
      * Test the comparator reversed.
      */
     public void testReverseComparator() {
-        assertTrue("equal", reverse.compare(equalFile1, equalFile2) == 0);
+        assertEquals("equal", 0, reverse.compare(equalFile1, equalFile2));
         assertTrue("less",  reverse.compare(moreFile, lessFile) < 0);
         assertTrue("more",  reverse.compare(lessFile, moreFile) > 0);
     }



Mime
View raw message