Commit 63ce80bc authored by Evan Hunt's avatar Evan Hunt
Browse files

Check sizeof(time_t) before running the time overflow test.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1367 e5f2f494-b856-4b98-b285-d166d9295462
parent 7830a83f
......@@ -61,8 +61,14 @@ TEST(DNSSECTimeTest, toText)
{
EXPECT_EQ("19700101000000", timeToText(0));
EXPECT_EQ("20100311233000", timeToText(1268350200));
}
// Jan 1, Year 10,000. What should we do?
//EXPECT_THROW(timeToText(253402300800LL), InvalidTime);
TEST(DNSSECTimeTest, overflow)
{
// Jan 1, Year 10,000.
if (sizeof(time_t) > 4) {
EXPECT_THROW(timeToText(253402300800LL), InvalidTime);
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment