You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/08/29 17:13:49 UTC

svn commit: r809146 - /commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c

Author: mturk
Date: Sat Aug 29 15:13:47 2009
New Revision: 809146

URL: http://svn.apache.org/viewvc?rev=809146&view=rev
Log:
more time tests

Modified:
    commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c

Modified: commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c?rev=809146&r1=809145&r2=809146&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/test/testsuite.c Sat Aug 29 15:13:47 2009
@@ -410,8 +410,8 @@
  *           2002-08-14 12:05:36.186711 -25200 [257 Sat].
  * Which happens to be when I wrote the new tests.
  */
-static acr_time_t test_now = ACR_INT64_C(1032030336186711);
-
+static acr_time_t test_now  = ACR_INT64_C(1032030336186711);
+static acr_time_t test_1980 = ACR_INT64_C(315532800000000);
 static int test_times(int argc, const char *const argv[])
 {
     int failed = 0;
@@ -433,9 +433,15 @@
         }
     }
     d2 = ACR_Acr2DosTime(test_now);
-    printf("Dos Time 0 is %d\n",  d2);
-    printf("Acr Time 0 is %lld\n", ACR_Dos2AcrTime(d2));
-    printf("Acr Time 0 is %lld\n", ACR_Dos2AcrTime(d2+1));
+    printf("Dos Time 1 is %04x - %04x\n",  d2 >> 16, d2 & 0xffff);
+    printf("Acr Time 1 is %ld\n", ACR_Dos2AcrTime(d2));
+    printf("Acr Time 1 is %ld\n", ACR_Dos2AcrTime(d2+1));
+
+    d2 = ACR_Acr2DosTime(test_1980);
+    printf("Dos Time 0 is %04x - %04x\n",  d2 >> 16, d2 & 0xffff);
+    printf("Acr Time 0 is %ld\n", ACR_Dos2AcrTime(d2));
+    printf("Acr Time 0 is %ld\n", ACR_Dos2AcrTime(d2+1));
+
     tests_failed += failed;
     if (failed)
         fprintf(stderr, "times:         Failed (%d)\n", failed);