commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r492913 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
Date Fri, 05 Jan 2007 05:36:51 GMT
Author: bayard
Date: Thu Jan  4 21:36:50 2007
New Revision: 492913

URL: http://svn.apache.org/viewvc?view=rev&rev=492913
Log:
Also test the JDK

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

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java?view=diff&rev=492913&r1=492912&r2=492913
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/DateFormatUtilsTest.java
Thu Jan  4 21:36:50 2007
@@ -217,11 +217,19 @@
         TimeZone timeZone = TimeZone.getTimeZone("CET");
         Locale locale = Locale.GERMANY;
 
+        // show Calendar is good
         Calendar cal = Calendar.getInstance(timeZone, locale);
         cal.set(1948, 3, 19);
         assertEquals("19/04/1948", DateFormatUtils.format( cal.getTime(), pattern, timeZone,
locale ) );
 
         Date date = new Date(48, 3, 19);
+
+        // test JDK
+        java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat(pattern, locale);
+        sdf.setTimeZone(timeZone);
+        assertEquals("19/04/1948", sdf.format( date ) );
+
+        // test Commons
         assertEquals("19/04/1948", DateFormatUtils.format( date, pattern, timeZone, locale
) );
     }
 



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


Mime
View raw message