1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tests: Add a gettime test for sizeof (time_t) > 4.

* common/t-gettime.c (test_isotime2epoch): Add 4 more tests.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-07-04 10:00:34 +02:00
parent 9177a89773
commit 27d158ead4
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B

View File

@ -54,6 +54,12 @@ test_isotime2epoch (void)
{ "20070629T160000 ", 1183132800 }, { "20070629T160000 ", 1183132800 },
{ "20070629T160000\n", 1183132800 }, { "20070629T160000\n", 1183132800 },
{ "20070629T160000.", INVALID }, { "20070629T160000.", INVALID },
#if SIZEOF_TIME_T > 4
{ "21060207T062815", (time_t)0x0ffffffff },
{ "21060207T062816", (time_t)0x100000000 },
{ "21060207T062817", (time_t)0x100000001 },
{ "21060711T120001", (time_t)4308292801 },
#endif /*SIZEOF_TIME_T > 4*/
{ NULL, 0 } { NULL, 0 }
}; };
int idx; int idx;