dsound: Tune some parameters for alsa waveout.
[wine] / dlls / kernel32 / tests / time.c
1 /*
2  * Unit test suite for time functions
3  *
4  * Copyright 2004 Uwe Bonnes
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19  */
20
21 #include "wine/test.h"
22 #include "winbase.h"
23
24 #define SECSPERMIN         60
25 #define SECSPERDAY        86400
26 /* 1601 to 1970 is 369 years plus 89 leap days */
27 #define SECS_1601_TO_1970  ((369 * 365 + 89) * (ULONGLONG)SECSPERDAY)
28 #define TICKSPERSEC       10000000
29 #define TICKSPERMSEC      10000
30 #define TICKS_1601_TO_1970 (SECS_1601_TO_1970 * TICKSPERSEC)
31
32
33 #define NEWYEAR_1980_HI 0x01a8e79f
34 #define NEWYEAR_1980_LO 0xe1d58000
35
36 #define MAYDAY_2002_HI 0x01c1f107
37 #define MAYDAY_2002_LO 0xb82b6000
38
39 #define ATIME_HI  0x1c2349b
40 #define ATIME_LOW 0x580716b0
41
42 #define LOCAL_ATIME_HI  0x01c23471
43 #define LOCAL_ATIME_LOW 0x6f310eb0
44
45 #define DOS_DATE(y,m,d) ( (((y)-1980)<<9) | ((m)<<5) | (d) )
46 #define DOS_TIME(h,m,s) ( ((h)<<11) | ((m)<<5) | ((s)>>1) )
47
48
49 #define SETUP_1980(st) \
50     (st).wYear = 1980; \
51     (st).wMonth = 1; \
52     (st).wDay = 1; \
53     (st).wHour = 0; \
54     (st).wMinute = 0; \
55     (st).wSecond = 0; \
56     (st).wMilliseconds = 0;
57
58 #define SETUP_2002(st) \
59     (st).wYear = 2002; \
60     (st).wMonth = 5; \
61     (st).wDay = 1; \
62     (st).wHour = 12; \
63     (st).wMinute = 0; \
64     (st).wSecond = 0; \
65     (st).wMilliseconds = 0;
66
67 #define SETUP_ATIME(st) \
68     (st).wYear = 2002; \
69     (st).wMonth = 7; \
70     (st).wDay = 26; \
71     (st).wHour = 11; \
72     (st).wMinute = 55; \
73     (st).wSecond = 32; \
74     (st).wMilliseconds = 123;
75
76 #define SETUP_ZEROTIME(st) \
77     (st).wYear = 1601; \
78     (st).wMonth = 1; \
79     (st).wDay = 1; \
80     (st).wHour = 0; \
81     (st).wMinute = 0; \
82     (st).wSecond = 0; \
83     (st).wMilliseconds = 0;
84
85 #define SETUP_EARLY(st) \
86     (st).wYear = 1600; \
87     (st).wMonth = 12; \
88     (st).wDay = 31; \
89     (st).wHour = 23; \
90     (st).wMinute = 59; \
91     (st).wSecond = 59; \
92     (st).wMilliseconds = 999;
93
94
95 static void test_conversions(void)
96 {
97     FILETIME ft;
98     SYSTEMTIME st;
99
100     memset(&ft,0,sizeof ft);
101
102     SETUP_EARLY(st)
103     ok (!SystemTimeToFileTime(&st, &ft), "Conversion succeeded EARLY\n");
104     ok (GetLastError() == ERROR_INVALID_PARAMETER, "EARLY should be INVALID\n");
105
106     SETUP_ZEROTIME(st)
107     ok (SystemTimeToFileTime(&st, &ft), "Conversion failed ZERO_TIME\n");
108     ok( (!((ft.dwHighDateTime != 0) || (ft.dwLowDateTime != 0))),
109         "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n",
110         ft.dwLowDateTime, ft.dwHighDateTime, 0, 0);
111
112
113     SETUP_ATIME(st)
114     ok (SystemTimeToFileTime(&st,&ft), "Conversion Failed ATIME\n");
115     ok( (!((ft.dwHighDateTime != ATIME_HI) || (ft.dwLowDateTime!=ATIME_LOW))),
116         "Wrong time for ATIME: %08x %08x (correct %08x %08x)\n",
117         ft.dwLowDateTime, ft.dwHighDateTime, ATIME_LOW, ATIME_HI);
118
119
120     SETUP_2002(st)
121     ok (SystemTimeToFileTime(&st, &ft), "Conversion failed 2002\n");
122
123     ok( (!((ft.dwHighDateTime != MAYDAY_2002_HI) ||
124          (ft.dwLowDateTime!=MAYDAY_2002_LO))),
125         "Wrong time for 2002 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime,
126         ft.dwHighDateTime, MAYDAY_2002_LO, MAYDAY_2002_HI);
127
128
129     SETUP_1980(st)
130     ok((SystemTimeToFileTime(&st, &ft)), "Conversion failed 1980\n");
131
132     ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) ||
133         (ft.dwLowDateTime!=NEWYEAR_1980_LO))) ,
134         "Wrong time for 1980 %08x %08x (correct %08x %08x)\n", ft.dwLowDateTime,
135          ft.dwHighDateTime, NEWYEAR_1980_LO,NEWYEAR_1980_HI  );
136
137     ok(DosDateTimeToFileTime(DOS_DATE(1980,1,1),DOS_TIME(0,0,0),&ft),
138         "DosDateTimeToFileTime() failed\n");
139
140     ok( (!((ft.dwHighDateTime!=NEWYEAR_1980_HI) ||
141          (ft.dwLowDateTime!=NEWYEAR_1980_LO))),
142         "Wrong time DosDateTimeToFileTime %08x %08x (correct %08x %08x)\n",
143         ft.dwHighDateTime, ft.dwLowDateTime, NEWYEAR_1980_HI, NEWYEAR_1980_LO);
144
145 }
146
147 static void test_invalid_arg(void)
148 {
149     FILETIME ft;
150     SYSTEMTIME st;
151
152
153     /* Invalid argument checks */
154
155     memset(&ft,0,sizeof ft);
156     ok( DosDateTimeToFileTime(DOS_DATE(1980,1,1),DOS_TIME(0,0,0),&ft), /* this is 1 Jan 1980 00:00:00 */
157         "DosDateTimeToFileTime() failed\n");
158
159     ok( (ft.dwHighDateTime==NEWYEAR_1980_HI) && (ft.dwLowDateTime==NEWYEAR_1980_LO),
160         "filetime for 1/1/80 00:00:00 was %08x %08x\n", ft.dwHighDateTime, ft.dwLowDateTime);
161
162     /* now check SystemTimeToFileTime */
163     memset(&ft,0,sizeof ft);
164
165
166     /* try with a bad month */
167     SETUP_1980(st)
168     st.wMonth = 0;
169
170     ok( !SystemTimeToFileTime(&st, &ft), "bad month\n");
171
172     /* with a bad hour */
173     SETUP_1980(st)
174     st.wHour = 24;
175
176     ok( !SystemTimeToFileTime(&st, &ft), "bad hour\n");
177
178     /* with a bad minute */
179     SETUP_1980(st)
180     st.wMinute = 60;
181
182     ok( !SystemTimeToFileTime(&st, &ft), "bad minute\n");
183 }
184  
185 static void test_GetTimeZoneInformation(void)
186 {
187     TIME_ZONE_INFORMATION tzinfo, tzinfo1;
188     DWORD res =  GetTimeZoneInformation(&tzinfo);
189     ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
190     ok(SetEnvironmentVariableA("TZ","GMT0") != 0,
191        "SetEnvironmentVariableA failed\n");
192     res =  GetTimeZoneInformation(&tzinfo1);
193     ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
194
195     ok(((tzinfo.Bias == tzinfo1.Bias) && 
196         (tzinfo.StandardBias == tzinfo1.StandardBias) &&
197         (tzinfo.DaylightBias == tzinfo1.DaylightBias)),
198        "Bias influenced by TZ variable\n"); 
199     ok(SetEnvironmentVariableA("TZ",NULL) != 0,
200        "SetEnvironmentVariableA failed\n");
201         
202 }
203
204 static void test_FileTimeToSystemTime(void)
205 {
206     FILETIME ft;
207     SYSTEMTIME st;
208     ULONGLONG time = (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970;
209     BOOL ret;
210
211     ft.dwHighDateTime = 0;
212     ft.dwLowDateTime  = 0;
213     ret = FileTimeToSystemTime(&ft, &st);
214     ok( ret,
215        "FileTimeToSystemTime() failed with Error %d\n",GetLastError());
216     ok(((st.wYear == 1601) && (st.wMonth  == 1) && (st.wDay    == 1) &&
217         (st.wHour ==    0) && (st.wMinute == 0) && (st.wSecond == 0) &&
218         (st.wMilliseconds == 0)),
219         "Got Year %4d Month %2d Day %2d\n",  st.wYear, st.wMonth, st.wDay);
220
221     ft.dwHighDateTime = (UINT)(time >> 32);
222     ft.dwLowDateTime  = (UINT)time;
223     ret = FileTimeToSystemTime(&ft, &st);
224     ok( ret,
225        "FileTimeToSystemTime() failed with Error %d\n",GetLastError());
226     ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
227         (st.wHour ==    0) && (st.wMinute == 0) && (st.wSecond == 1) &&
228         (st.wMilliseconds == 0)),
229        "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n",
230        st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond,
231        st.wMilliseconds);
232 }
233
234 static void test_FileTimeToLocalFileTime(void)
235 {
236     FILETIME ft, lft;
237     SYSTEMTIME st;
238     TIME_ZONE_INFORMATION tzinfo;
239     DWORD res =  GetTimeZoneInformation(&tzinfo);
240     ULONGLONG time = (ULONGLONG)TICKSPERSEC + TICKS_1601_TO_1970 +
241         (LONGLONG)(tzinfo.Bias + 
242             ( res == TIME_ZONE_ID_STANDARD ? tzinfo.StandardBias :
243             ( res == TIME_ZONE_ID_DAYLIGHT ? tzinfo.DaylightBias : 0 ))) *
244              SECSPERMIN *TICKSPERSEC;
245     BOOL ret;
246
247     ok( res != TIME_ZONE_ID_INVALID , "GetTimeZoneInformation failed\n");
248     ft.dwHighDateTime = (UINT)(time >> 32);
249     ft.dwLowDateTime  = (UINT)time;
250     ret = FileTimeToLocalFileTime(&ft, &lft);
251     ok( ret,
252        "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError());
253     FileTimeToSystemTime(&lft, &st);
254     ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
255         (st.wHour ==    0) && (st.wMinute == 0) && (st.wSecond == 1) &&
256         (st.wMilliseconds == 0)),
257        "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n",
258        st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond,
259        st.wMilliseconds);
260
261     ok(SetEnvironmentVariableA("TZ","GMT") != 0,
262        "SetEnvironmentVariableA failed\n");
263     ok(res != TIME_ZONE_ID_INVALID, "GetTimeZoneInformation failed\n");
264     ret = FileTimeToLocalFileTime(&ft, &lft);
265     ok( ret,
266        "FileTimeToLocalFileTime() failed with Error %d\n",GetLastError());
267     FileTimeToSystemTime(&lft, &st);
268     ok(((st.wYear == 1970) && (st.wMonth == 1) && (st.wDay == 1) &&
269         (st.wHour ==    0) && (st.wMinute == 0) && (st.wSecond == 1) &&
270         (st.wMilliseconds == 0)),
271        "Got Year %4d Month %2d Day %2d Hour %2d Min %2d Sec %2d mSec %3d\n",
272        st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond,
273        st.wMilliseconds);
274     ok(SetEnvironmentVariableA("TZ",NULL) != 0,
275        "SetEnvironmentVariableA failed\n");
276 }
277
278
279 /* test TzSpecificLocalTimeToSystemTime and SystemTimeToTzSpecificLocalTime
280  * these are in winXP and later */
281 typedef HANDLE (WINAPI *fnTzSpecificLocalTimeToSystemTime)( LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME);
282 typedef HANDLE (WINAPI *fnSystemTimeToTzSpecificLocalTime)( LPTIME_ZONE_INFORMATION, LPSYSTEMTIME, LPSYSTEMTIME);
283
284 typedef struct {
285     int nr;             /* test case number for easier lookup */
286     TIME_ZONE_INFORMATION *ptz; /* ptr to timezone */
287     SYSTEMTIME slt;     /* system/local time to convert */
288     WORD ehour;        /* expected hour */
289 } TZLT2ST_case;
290
291 static void test_TzSpecificLocalTimeToSystemTime(void)
292 {    
293     HMODULE hKernel = GetModuleHandle("kernel32");
294     fnTzSpecificLocalTimeToSystemTime pTzSpecificLocalTimeToSystemTime;
295     fnSystemTimeToTzSpecificLocalTime pSystemTimeToTzSpecificLocalTime = NULL;
296     TIME_ZONE_INFORMATION tzE, tzW, tzS;
297     SYSTEMTIME result;
298     int i, j, year;
299     pTzSpecificLocalTimeToSystemTime = (fnTzSpecificLocalTimeToSystemTime) GetProcAddress( hKernel, "TzSpecificLocalTimeToSystemTime");
300     if(pTzSpecificLocalTimeToSystemTime)
301         pSystemTimeToTzSpecificLocalTime = (fnTzSpecificLocalTimeToSystemTime) GetProcAddress( hKernel, "SystemTimeToTzSpecificLocalTime");
302     if( !pSystemTimeToTzSpecificLocalTime)
303         return;
304     ZeroMemory( &tzE, sizeof(tzE));
305     ZeroMemory( &tzW, sizeof(tzW));
306     ZeroMemory( &tzS, sizeof(tzS));
307     /* timezone Eastern hemisphere */
308     tzE.Bias=-600;
309     tzE.StandardBias=0;
310     tzE.DaylightBias=-60;
311     tzE.StandardDate.wMonth=10;
312     tzE.StandardDate.wDayOfWeek=0; /*sunday */
313     tzE.StandardDate.wDay=5;       /* last (sunday) of the month */
314     tzE.StandardDate.wHour=3;
315     tzE.DaylightDate.wMonth=3;
316     tzE.DaylightDate.wDay=5;
317     tzE.DaylightDate.wHour=2;
318     /* timezone Western hemisphere */
319     tzW.Bias=240;
320     tzW.StandardBias=0;
321     tzW.DaylightBias=-60;
322     tzW.StandardDate.wMonth=10;
323     tzW.StandardDate.wDayOfWeek=0; /*sunday */
324     tzW.StandardDate.wDay=4;       /* 4th (sunday) of the month */
325     tzW.StandardDate.wHour=2;
326     tzW.DaylightDate.wMonth=4;
327     tzW.DaylightDate.wDay=1;
328     tzW.DaylightDate.wHour=2;
329     /* timezone Eastern hemisphere */
330     tzS.Bias=240;
331     tzS.StandardBias=0;
332     tzS.DaylightBias=-60;
333     tzS.StandardDate.wMonth=4;
334     tzS.StandardDate.wDayOfWeek=0; /*sunday */
335     tzS.StandardDate.wDay=1;       /* 1st  (sunday) of the month */
336     tzS.StandardDate.wHour=2;
337     tzS.DaylightDate.wMonth=10;
338     tzS.DaylightDate.wDay=4;
339     tzS.DaylightDate.wHour=2;
340     /*tests*/
341         /* TzSpecificLocalTimeToSystemTime */
342     {   TZLT2ST_case cases[] = {
343             /* standard->daylight transition */
344             { 1, &tzE, {2004,3,-1,28,1,0,0,0}, 15 },
345             { 2, &tzE, {2004,3,-1,28,1,59,59,999}, 15},
346             { 3, &tzE, {2004,3,-1,28,2,0,0,0}, 15},
347             /* daylight->standard transition */
348             { 4, &tzE, {2004,10,-1,31,2,0,0,0} , 15 },
349             { 5, &tzE, {2004,10,-1,31,2,59,59,999}, 15 },
350             { 6, &tzE, {2004,10,-1,31,3,0,0,0}, 17 },
351             /* West and with fixed weekday of the month */
352             { 7, &tzW, {2004,4,-1,4,1,0,0,0}, 5},
353             { 8, &tzW, {2004,4,-1,4,1,59,59,999}, 5},
354             { 9, &tzW, {2004,4,-1,4,2,0,0,0}, 5},
355             { 10, &tzW, {2004,10,-1,24,1,0,0,0}, 4},
356             { 11, &tzW, {2004,10,-1,24,1,59,59,999}, 4},
357             { 12, &tzW, {2004,10,-1,24,2,0,0,0 }, 6},
358             /* and now south */
359             { 13, &tzS, {2004,4,-1,4,1,0,0,0}, 4},
360             { 14, &tzS, {2004,4,-1,4,1,59,59,999}, 4},
361             { 15, &tzS, {2004,4,-1,4,2,0,0,0}, 6},
362             { 16, &tzS, {2004,10,-1,24,1,0,0,0}, 5},
363             { 17, &tzS, {2004,10,-1,24,1,59,59,999}, 5},
364             { 18, &tzS, {2004,10,-1,24,2,0,0,0}, 5},
365             {0}
366         };
367     /*  days of transitions to put into the cases array */
368         int yeardays[][6]=
369         {
370               {28,31,4,24,4,24}  /* 1999 */
371             , {26,29,2,22,2,22}  /* 2000 */
372             , {25,28,1,28,1,28}  /* 2001 */
373             , {31,27,7,27,7,27}  /* 2002 */
374             , {30,26,6,26,6,26}  /* 2003 */
375             , {28,31,4,24,4,24}  /* 2004 */
376             , {27,30,3,23,3,23}  /* 2005 */
377             , {26,29,2,22,2,22}  /* 2006 */
378             , {25,28,1,28,1,28}  /* 2007 */
379             , {30,26,6,26,6,26}  /* 2008 */
380             , {29,25,5,25,5,25}  /* 2009 */
381             , {28,31,4,24,4,24}  /* 2010 */
382             , {27,30,3,23,3,23}  /* 2011 */
383             , {25,28,1,28,1,28}  /* 2012 */
384             , {31,27,7,27,7,27}  /* 2013 */
385             , {30,26,6,26,6,26}  /* 2014 */
386             , {29,25,5,25,5,25}  /* 2015 */
387             , {27,30,3,23,3,23}  /* 2016 */
388             , {26,29,2,22,2,22}  /* 2017 */
389             , {25,28,1,28,1,28}  /* 2018 */
390             , {31,27,7,27,7,27}  /* 2019 */
391             ,{0}
392         };
393         for( j=0 , year = 1999; yeardays[j][0] ; j++, year++) {
394             for (i=0; cases[i].nr; i++) {
395                 if(i) cases[i].nr += 18;
396                 cases[i].slt.wYear = year;
397                 cases[i].slt.wDay = yeardays[j][i/3];
398                 pTzSpecificLocalTimeToSystemTime( cases[i].ptz, &(cases[i].slt), &result);
399                 ok( result.wHour == cases[i].ehour,
400                         "Test TzSpecificLocalTimeToSystemTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour =  %02d\n", 
401                         cases[i].nr, result.wYear, result.wMonth, result.wDay,
402                         result.wHour, result.wMinute, cases[i].ehour);
403             }
404         }
405     }
406         /* SystemTimeToTzSpecificLocalTime */
407     {   TZLT2ST_case cases[] = {
408             /* standard->daylight transition */
409             { 1, &tzE, {2004,3,-1,27,15,0,0,0}, 1 },
410             { 2, &tzE, {2004,3,-1,27,15,59,59,999}, 1},
411             { 3, &tzE, {2004,3,-1,27,16,0,0,0}, 3},
412             /* daylight->standard transition */
413             { 4,  &tzE, {2004,10,-1,30,15,0,0,0}, 2 },
414             { 5, &tzE, {2004,10,-1,30,15,59,59,999}, 2 },
415             { 6, &tzE, {2004,10,-1,30,16,0,0,0}, 2 },
416             /* West and with fixed weekday of the month */
417             { 7, &tzW, {2004,4,-1,4,5,0,0,0}, 1},
418             { 8, &tzW, {2004,4,-1,4,5,59,59,999}, 1},
419             { 9, &tzW, {2004,4,-1,4,6,0,0,0}, 3},
420             { 10, &tzW, {2004,10,-1,24,4,0,0,0}, 1},
421             { 11, &tzW, {2004,10,-1,24,4,59,59,999}, 1},
422             { 12, &tzW, {2004,10,-1,24,5,0,0,0 }, 1},
423             /* and now south */
424             { 13, &tzS, {2004,4,-1,4,4,0,0,0}, 1},
425             { 14, &tzS, {2004,4,-1,4,4,59,59,999}, 1},
426             { 15, &tzS, {2004,4,-1,4,5,0,0,0}, 1},
427             { 16, &tzS, {2004,10,-1,24,5,0,0,0}, 1},
428             { 17, &tzS, {2004,10,-1,24,5,59,59,999}, 1},
429             { 18, &tzS, {2004,10,-1,24,6,0,0,0}, 3},
430
431             {0}
432         }; 
433     /*  days of transitions to put into the cases array */
434         int yeardays[][6]=
435         {
436               {27,30,4,24,4,24}  /* 1999 */
437             , {25,28,2,22,2,22}  /* 2000 */
438             , {24,27,1,28,1,28}  /* 2001 */
439             , {30,26,7,27,7,27}  /* 2002 */
440             , {29,25,6,26,6,26}  /* 2003 */
441             , {27,30,4,24,4,24}  /* 2004 */
442             , {26,29,3,23,3,23}  /* 2005 */
443             , {25,28,2,22,2,22}  /* 2006 */
444             , {24,27,1,28,1,28}  /* 2007 */
445             , {29,25,6,26,6,26}  /* 2008 */
446             , {28,24,5,25,5,25}  /* 2009 */
447             , {27,30,4,24,4,24}  /* 2010 */
448             , {26,29,3,23,3,23}  /* 2011 */
449             , {24,27,1,28,1,28}  /* 2012 */
450             , {30,26,7,27,7,27}  /* 2013 */
451             , {29,25,6,26,6,26}  /* 2014 */
452             , {28,24,5,25,5,25}  /* 2015 */
453             , {26,29,3,23,3,23}  /* 2016 */
454             , {25,28,2,22,2,22}  /* 2017 */
455             , {24,27,1,28,1,28}  /* 2018 */
456             , {30,26,7,27,7,27}  /* 2019 */
457         };
458         for( j=0 , year = 1999; yeardays[j][0] ; j++, year++) {
459             for (i=0; cases[i].nr; i++) {
460                 if(i) cases[i].nr += 18;
461                 cases[i].slt.wYear = year;
462                 cases[i].slt.wDay = yeardays[j][i/3];
463                 pSystemTimeToTzSpecificLocalTime( cases[i].ptz, &(cases[i].slt), &result);
464                 ok( result.wHour == cases[i].ehour,
465                         "Test SystemTimeToTzSpecificLocalTime #%d. Got %4d-%02d-%02d %02d:%02d. Expect hour = %02d\n", 
466                         cases[i].nr, result.wYear, result.wMonth, result.wDay,
467                         result.wHour, result.wMinute, cases[i].ehour);
468             }
469         }
470
471     }        
472 }
473
474 START_TEST(time)
475 {
476     test_conversions();
477     test_invalid_arg();
478     test_GetTimeZoneInformation();
479     test_FileTimeToSystemTime();
480     test_FileTimeToLocalFileTime();
481     test_TzSpecificLocalTimeToSystemTime();
482 }