Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
36f7b7fa
Commit
36f7b7fa
authored
May 07, 2013
by
Thomas Markwalder
Browse files
[2355] Added logic to bypass large value test for Uint32BitParser on 32-bit
platforms.
parent
aedbd11c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/dhcpsrv/tests/dhcp_parsers_unittest.cc
View file @
36f7b7fa
...
...
@@ -163,10 +163,13 @@ TEST_F(DhcpParserTest, uint32ParserTest) {
ElementPtr
int_element
=
Element
::
create
(
-
1
);
EXPECT_THROW
(
parser
.
build
(
int_element
),
isc
::
BadValue
);
// Verify that parser with rejects too large a value.
long
max
=
(
long
)(
std
::
numeric_limits
<
uint32_t
>::
max
())
+
1
;
int_element
->
setValue
((
long
)(
max
));
EXPECT_THROW
(
parser
.
build
(
int_element
),
isc
::
BadValue
);
// Verify that parser with rejects too large a value provided we are on
// 64-bit platform.
if
(
sizeof
(
long
)
>
sizeof
(
uint32_t
))
{
long
max
=
(
long
)(
std
::
numeric_limits
<
uint32_t
>::
max
())
+
1
;
int_element
->
setValue
(
max
);
EXPECT_THROW
(
parser
.
build
(
int_element
),
isc
::
BadValue
);
}
// Verify that parser will build with value of zero.
int
test_value
=
0
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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