You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/09/25 23:46:34 UTC
svn commit: r1390172 -
/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
Author: sebb
Date: Tue Sep 25 21:46:34 2012
New Revision: 1390172
URL: http://svn.apache.org/viewvc?rev=1390172&view=rev
Log:
Extract constant
Label output with test case name
Modified:
commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java?rev=1390172&r1=1390171&r2=1390172&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java (original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java Tue Sep 25 21:46:34 2012
@@ -252,9 +252,10 @@ public class FastDateFormatTest {
@Test
public void testParseSync() throws InterruptedException {
- final FastDateFormat formatter= FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS Z");
+ final String pattern = "yyyy-MM-dd'T'HH:mm:ss.SSS Z";
+ final FastDateFormat formatter= FastDateFormat.getInstance(pattern);
- long sdfTime= measureTime(formatter, new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS Z") {
+ long sdfTime= measureTime(formatter, new SimpleDateFormat(pattern) {
private static final long serialVersionUID = 1L; // because SimpleDateFormat is serializable
@Override
@@ -265,9 +266,9 @@ public class FastDateFormatTest {
}
});
- long fdfTime= measureTime(formatter, FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss.SSS Z"));
+ long fdfTime= measureTime(formatter, FastDateFormat.getInstance(pattern));
- String times= "FastDateParser:"+fdfTime+" SimpleDateFormat:"+sdfTime;
+ String times= "FastDateParserTest: FastDateParser:"+fdfTime+" SimpleDateFormat:"+sdfTime;
System.out.println(times);
}