Adding unit test for LANG-59. Sometimes passes, sometimes fails

git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/lang/trunk@418834 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Henri Yandell 2006-07-03 19:21:14 +00:00
parent 9c2f070f61
commit 81340ea32f
1 changed files with 8 additions and 0 deletions

View File

@ -978,6 +978,14 @@ public void testMonthIterator() throws Exception {
dateParser.parse("December 2, 2001")); dateParser.parse("December 2, 2001"));
} }
// Tests LANG-59
public void testLang59() throws Exception {
// truncate 2004-10-31 01:00:00 MDT
Date oct31_01MDT = new Date(1099206000000L);
Date result = DateUtils.truncate(oct31_01MDT, Calendar.HOUR_OF_DAY);
assertEquals(oct31_01MDT, result);
}
/** /**
* This checks that this is a 7 element iterator of Calendar objects * This checks that this is a 7 element iterator of Calendar objects
* that are dates (no time), and exactly 1 day spaced after each other. * that are dates (no time), and exactly 1 day spaced after each other.