Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
f9ed88b3
Commit
f9ed88b3
authored
Feb 19, 2011
by
JINMEI Tatuya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[master] s/L/LU/ to make sure constants are unsigned.
parent
04934bb0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
src/lib/dns/tests/dnssectime_unittest.cc
src/lib/dns/tests/dnssectime_unittest.cc
+3
-3
No files found.
src/lib/dns/tests/dnssectime_unittest.cc
View file @
f9ed88b3
...
@@ -80,7 +80,7 @@ TEST_F(DNSSECTimeTest, fromText) {
...
@@ -80,7 +80,7 @@ TEST_F(DNSSECTimeTest, fromText) {
// Feb 7, 06:28:15 UTC 2106 is the possible maximum time that can be
// Feb 7, 06:28:15 UTC 2106 is the possible maximum time that can be
// represented as an unsigned 32bit integer without overflow.
// represented as an unsigned 32bit integer without overflow.
EXPECT_EQ
(
4294967295L
,
timeFromText32
(
"21060207062815"
));
EXPECT_EQ
(
4294967295L
U
,
timeFromText32
(
"21060207062815"
));
// After that, timeFromText32() should start returning the second count
// After that, timeFromText32() should start returning the second count
// modulo 2^32.
// modulo 2^32.
...
@@ -150,14 +150,14 @@ TEST_F(DNSSECTimeTest, toText) {
...
@@ -150,14 +150,14 @@ TEST_F(DNSSECTimeTest, toText) {
// that can be represented in the form of YYYYMMDDHHmmSS.
// that can be represented in the form of YYYYMMDDHHmmSS.
EXPECT_EQ
(
"99991231235959"
,
timeToText64
(
YEAR10K_EVE
));
EXPECT_EQ
(
"99991231235959"
,
timeToText64
(
YEAR10K_EVE
));
dnssectime
::
detail
::
gettimeFunction
=
testGetTime
<
YEAR10K_EVE
-
10
>
;
dnssectime
::
detail
::
gettimeFunction
=
testGetTime
<
YEAR10K_EVE
-
10
>
;
EXPECT_EQ
(
"99991231235959"
,
timeToText32
(
4294197631L
));
EXPECT_EQ
(
"99991231235959"
,
timeToText32
(
4294197631L
U
));
}
}
TEST_F
(
DNSSECTimeTest
,
overflow
)
{
TEST_F
(
DNSSECTimeTest
,
overflow
)
{
// Jan 1, Year 10,000.
// Jan 1, Year 10,000.
EXPECT_THROW
(
timeToText64
(
253402300800LL
),
InvalidTime
);
EXPECT_THROW
(
timeToText64
(
253402300800LL
),
InvalidTime
);
dnssectime
::
detail
::
gettimeFunction
=
testGetTime
<
YEAR10K_EVE
-
10
>
;
dnssectime
::
detail
::
gettimeFunction
=
testGetTime
<
YEAR10K_EVE
-
10
>
;
EXPECT_THROW
(
timeToText32
(
4294197632L
),
InvalidTime
);
EXPECT_THROW
(
timeToText32
(
4294197632L
U
),
InvalidTime
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment