You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2006/12/20 01:00:52 UTC

svn commit: r488859 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java

Author: bayard
Date: Tue Dec 19 16:00:51 2006
New Revision: 488859

URL: http://svn.apache.org/viewvc?view=rev&rev=488859
Log:
Added new tests (failing) in comments. Improved output for debugging brute force tests.

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java?view=diff&rev=488859&r1=488858&r2=488859
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java (original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DurationFormatUtilsTest.java Tue Dec 19 16:00:51 2006
@@ -469,16 +469,18 @@
 
         assertEqualDuration( "365", new int[] { 2007, 2, 2, 0, 0, 0 },
                 new int[] { 2008, 2, 1, 0, 0, 0 }, "dd"); 
+  //      assertEqualDuration( "333", new int[] { 2007, 1, 2, 0, 0, 0 },
+  //              new int[] { 2008, 0, 1, 0, 0, 0 }, "dd"); 
     }
     
     public void testDurationsByBruteForce() {
         bruteForce(2006, 0, 1);
         bruteForce(2006, 0, 2);
-//        bruteForce(2006, 1, 2);
+  //      bruteForce(2007, 1, 2);
     }
         
     private void bruteForce(int year, int month, int day) {
-        String msg = year + "-" + month + "-" + day + " at ";
+        String msg = year + "-" + month + "-" + day + " to ";
         Calendar c = Calendar.getInstance();
         c.set(year, month, day, 0, 0, 0);
         int[] array1 = new int[] { year, month, day, 0, 0, 0 };
@@ -487,7 +489,8 @@
             array2[0] = c.get(Calendar.YEAR);
             array2[1] = c.get(Calendar.MONTH);
             array2[2] = c.get(Calendar.DAY_OF_MONTH);
-            assertEqualDuration( msg + i, Integer.toString(i), array1, array2, "d" );
+            String tmpMsg = msg + array2[0] + "-" + array2[1] + "-" + array2[2] + " at ";
+            assertEqualDuration( tmpMsg + i, Integer.toString(i), array1, array2, "d" );
             c.add(Calendar.DAY_OF_MONTH, 1);
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org