Hello Daniel,

Thanks for your reply.

Your patch cures one of two failures. But there another test failure.

junit.framework.ComparisonFailure:
Expected:19700101010000000
Actual  :19700101020000000
        at 
org.apache.lucene.document.TestDateTools.testDateAndTimetoString(TestDateTools.java:118)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)

        
by analogy with your changes i made changes in sources


Index: src/test/org/apache/lucene/document/TestDateTools.java
===================================================================
RCS file: 
/home/cvspublic/jakarta-lucene/src/test/org/apache/lucene/document/TestDateTools.java,v
retrieving revision 1.2
diff -u -r1.2 TestDateTools.java
--- src/test/org/apache/lucene/document/TestDateTools.java      11 Oct 2004 20:32:44 
-0000      1.2
+++ src/test/org/apache/lucene/document/TestDateTools.java      12 Oct 2004 06:53:02 
-0000
@@ -114,10 +114,16 @@
     assertEquals("1961-03-05 23:00:00:000", 
isoFormat(DateTools.stringToDate(dateString)));
 
     // timeToString:
-    dateString = DateTools.timeToString(0, DateTools.Resolution.MILLISECOND);
-    assertEquals("19700101010000000", dateString);
+      cal.set(1970, 0, 1,    // year=1970, month=january, day=1
+          0, 0, 0);          // hour, minute, second
+      cal.set(Calendar.MILLISECOND, 0);
+    dateString = DateTools.timeToString(cal.getTime().getTime(), 
DateTools.Resolution.MILLISECOND);
+    assertEquals("19700101000000000", dateString);
 
-    dateString = DateTools.timeToString(123000, DateTools.Resolution.MILLISECOND);
+      cal.set(1970, 0, 1,    // year=1970, month=january, day=1
+          1, 2, 3);          // hour, minute, second
+      cal.set(Calendar.MILLISECOND, 0);
+    dateString = DateTools.timeToString(cal.getTime().getTime(), 
DateTools.Resolution.MILLISECOND);
     assertEquals("19700101010203000", dateString);
     
   }
        

        

Monday, October 11, 2004, 11:33:49 PM, you wrote:

> On Monday 11 October 2004 10:44, Anatol Pomozov wrote:

>> I've updated source tree from CVS and tried to run unit tests.
>> They are failed. See log below.

> Could you try again? I just committed a supposed fix.

> Regards
>  Daniel


--anatol


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to