test-asn1: Fix skipping of >2038 tests on i386
The two constants overflow time_t on i386 (they also produced a compiler warning without type suffix) so the comparison with TIME_32_BIT_SIGNED_MAX did not work as intended. Fixes #477.
This commit is contained in:
@@ -472,7 +472,7 @@ START_TEST(test_asn1_to_time)
|
||||
{ 5097600, 0x17, "7003010000Z" },
|
||||
{ 68256000, 0x17, "7203010000Z" },
|
||||
{ 951868800, 0x17, "0003010000Z" },
|
||||
{ 4107542400, 0x18, "210003010000Z" }
|
||||
{ 4107542400UL, 0x18, "210003010000Z" }
|
||||
};
|
||||
|
||||
int i;
|
||||
@@ -480,7 +480,7 @@ START_TEST(test_asn1_to_time)
|
||||
|
||||
for (i = 0; i < countof(test); i++)
|
||||
{
|
||||
if (test[i].time > TIME_32_BIT_SIGNED_MAX && sizeof(time_t) == 4)
|
||||
if (sizeof(time_t) == 4 && test[i].time < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -512,7 +512,7 @@ START_TEST(test_asn1_from_time)
|
||||
{ 1078099200, 0x17, chunk_from_chars(
|
||||
0x17, 0x0d, 0x30, 0x34, 0x30, 0x33, 0x30, 0x31,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a) },
|
||||
{ 4107542400, 0x18, chunk_from_chars(
|
||||
{ 4107542400UL, 0x18, chunk_from_chars(
|
||||
0x18, 0x0f, 0x32, 0x31, 0x30, 0x30, 0x30, 0x33, 0x30, 0x31,
|
||||
0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a) }
|
||||
};
|
||||
@@ -522,7 +522,7 @@ START_TEST(test_asn1_from_time)
|
||||
|
||||
for (i = 0; i < countof(test); i++)
|
||||
{
|
||||
if (test[i].time > TIME_32_BIT_SIGNED_MAX && sizeof(time_t) == 4)
|
||||
if (sizeof(time_t) == 4 && test[i].time < 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user