@@ -736,16 +736,19 @@ void testIsSameDay_CalNullNull() {
736736
737737 @ Test
738738 void testIsSameDay_Date () {
739- Date datea = new GregorianCalendar (2004 , 6 , 9 , 13 , 45 ).getTime ();
740- Date dateb = new GregorianCalendar (2004 , 6 , 9 , 13 , 45 ).getTime ();
741- assertTrue (DateUtils .isSameDay (datea , dateb ));
742- dateb = new GregorianCalendar (2004 , 6 , 10 , 13 , 45 ).getTime ();
743- assertFalse (DateUtils .isSameDay (datea , dateb ));
744- datea = new GregorianCalendar (2004 , 6 , 10 , 13 , 45 ).getTime ();
745- assertTrue (DateUtils .isSameDay (datea , dateb ));
746- dateb = new GregorianCalendar (2005 , 6 , 10 , 13 , 45 ).getTime ();
747- assertFalse (DateUtils .isSameDay (datea , dateb ));
748- assertFalse (DateUtils .isSameDay (MAX_DATE , MAX_DATE ));
739+ Date dateA = new GregorianCalendar (2004 , 6 , 9 , 13 , 45 ).getTime ();
740+ Date dateB = new GregorianCalendar (2004 , 6 , 9 , 13 , 45 ).getTime ();
741+ assertTrue (DateUtils .isSameDay (dateA , dateB ));
742+ dateB = new GregorianCalendar (2004 , 6 , 10 , 13 , 45 ).getTime ();
743+ assertFalse (DateUtils .isSameDay (dateA , dateB ));
744+ dateA = new GregorianCalendar (2004 , 6 , 10 , 13 , 45 ).getTime ();
745+ assertTrue (DateUtils .isSameDay (dateA , dateB ));
746+ dateB = new GregorianCalendar (2005 , 6 , 10 , 13 , 45 ).getTime ();
747+ assertFalse (DateUtils .isSameDay (dateA , dateB ));
748+ assertTrue (DateUtils .isSameDay (dateA , dateA ));
749+ assertTrue (DateUtils .isSameDay (dateA , (Date ) dateA .clone ()));
750+ assertTrue (DateUtils .isSameDay (MAX_DATE , MAX_DATE ));
751+ assertTrue (DateUtils .isSameDay (MAX_DATE , (Date ) MAX_DATE .clone ()));
749752 }
750753
751754 @ Test
0 commit comments