don't just write date to stdout, include date string in failure message

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@577873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris M. Hostetter 2007-09-20 18:52:42 +00:00
parent fada31fa7f
commit 3f517bff75
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ public class TestDateFormater extends TestCase {
Date date = new Date();
String formatedDate = DateFormater.formatDate(date,DateFormater.HTTP_HEADER_DATE_FORMAT);
System.out.println("DATE: " + formatedDate);
assertTrue(pattern.matcher(formatedDate).matches());
assertTrue(formatedDate + " does not match expected pattern",
pattern.matcher(formatedDate).matches());
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 +0000",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 CEST",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
//TODO extend this