BIND 10 trac61, updated. d6f67da406651c7cc013ce28c513c23ee43e2efc [trac61] tested the year 10K case for the 32bit version.
BIND 10 source code commits
bind10-changes at lists.isc.org
Sat Feb 19 01:06:09 UTC 2011
The branch, trac61 has been updated
via d6f67da406651c7cc013ce28c513c23ee43e2efc (commit)
from e6e3ba735b384ebe4ee1ccacb39af2100bdd5f19 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d6f67da406651c7cc013ce28c513c23ee43e2efc
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Fri Feb 18 17:05:51 2011 -0800
[trac61] tested the year 10K case for the 32bit version.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tests/dnssectime_unittest.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tests/dnssectime_unittest.cc b/src/lib/dns/tests/dnssectime_unittest.cc
index 9a8a859..184da65 100644
--- a/src/lib/dns/tests/dnssectime_unittest.cc
+++ b/src/lib/dns/tests/dnssectime_unittest.cc
@@ -102,6 +102,10 @@ testGetTime() {
return (NOW);
}
+// Seconds since epoch for the year 10K eve. Commonly used in some tests
+// below.
+const uint64_t YEAR10K_EVE = 253402300799LL;
+
TEST_F(DNSSECTimeTest, toText) {
// Set the current time to: Feb 18 09:04:14 UTC 2012 (an arbitrary choice
// in the range of the first half of uint32 since epoch).
@@ -147,7 +151,6 @@ TEST_F(DNSSECTimeTest, toText) {
// Try very large time value. Actually it's the possible farthest time
// that can be represented in the form of YYYYMMDDHHmmSS.
- const uint64_t YEAR10K_EVE = 253402300799LL;
EXPECT_EQ("99991231235959", timeToText64(YEAR10K_EVE));
dnssectime::detail::gettimeFunction = testGetTime<YEAR10K_EVE - 10>;
EXPECT_EQ("99991231235959", timeToText32(4294197631L));
@@ -156,6 +159,8 @@ TEST_F(DNSSECTimeTest, toText) {
TEST_F(DNSSECTimeTest, overflow) {
// Jan 1, Year 10,000.
EXPECT_THROW(timeToText64(253402300800LL), InvalidTime);
+ dnssectime::detail::gettimeFunction = testGetTime<YEAR10K_EVE - 10>;
+ EXPECT_THROW(timeToText32(4294197632L), InvalidTime);
}
}
More information about the bind10-changes
mailing list