dovecot: Fixed tests. utc_mktime() can't handle returning -2^(TI...
dovecot at dovecot.org
dovecot at dovecot.org
Fri Jan 4 04:40:14 EET 2008
details: http://hg.dovecot.org/dovecot/rev/fe74d0999e3a
changeset: 7108:fe74d0999e3a
user: Timo Sirainen <tss at iki.fi>
date: Fri Jan 04 04:38:03 2008 +0200
description:
Fixed tests. utc_mktime() can't handle returning -2^(TIME_T_MAX_BITS-1).
diffstat:
2 files changed, 8 insertions(+), 8 deletions(-)
src/tests/test-lib.c | 4 ++--
src/tests/test-mail.c | 12 ++++++------
diffs (50 lines):
diff -r 95cadc27d344 -r fe74d0999e3a src/tests/test-lib.c
--- a/src/tests/test-lib.c Fri Jan 04 04:36:14 2008 +0200
+++ b/src/tests/test-lib.c Fri Jan 04 04:38:03 2008 +0200
@@ -428,7 +428,7 @@ static void test_utc_mktime(void)
{ 1969, 12, 31, 23, 59, 59 },
{ 1901, 12, 13, 20, 45, 53 },
#endif
-#if TIME_T_MAX_BITS > 32
+#if (TIME_T_MAX_BITS > 32 || !defined(TIME_T_SIGNED))
{ 2106, 2, 7, 6, 28, 15 },
#endif
{ 2007, 11, 7, 1, 7, 20 },
@@ -440,7 +440,7 @@ static void test_utc_mktime(void)
-1,
-2147483647,
#endif
-#if TIME_T_MAX_BITS > 32
+#if (TIME_T_MAX_BITS > 32 || !defined(TIME_T_SIGNED))
4294967295,
#endif
1194397640,
diff -r 95cadc27d344 -r fe74d0999e3a src/tests/test-mail.c
--- a/src/tests/test-mail.c Fri Jan 04 04:36:14 2008 +0200
+++ b/src/tests/test-mail.c Fri Jan 04 04:38:03 2008 +0200
@@ -132,9 +132,9 @@ static void test_message_date_parse(void
static const char *input[] = {
#ifdef TIME_T_SIGNED
"Thu, 01 Jan 1970 01:59:59 +0200",
- "Fri, 13 Dec 1901 20:45:52 +0000",
-#endif
-#if TIME_T_MAX_BITS > 31
+ "Fri, 13 Dec 1901 20:45:53 +0000",
+#endif
+#if (TIME_T_MAX_BITS > 32 || !defined(TIME_T_SIGNED))
"Sun, 07 Feb 2106 06:28:15 +0000",
#endif
"Wed, 07 Nov 2007 01:07:20 +0200",
@@ -146,9 +146,9 @@ static void test_message_date_parse(void
static struct test_message_date_output output[] = {
#ifdef TIME_T_SIGNED
{ -1, 2*60, TRUE },
- { -2147483648, 0, TRUE },
-#endif
-#if TIME_T_MAX_BITS > 31
+ { -2147483647, 0, TRUE },
+#endif
+#if (TIME_T_MAX_BITS > 32 || !defined(TIME_T_SIGNED))
{ 4294967295, 0, TRUE },
#endif
{ 1194390440, 2*60, TRUE },
More information about the dovecot-cvs
mailing list