Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
f70d131f
Commit
f70d131f
authored
Nov 29, 2012
by
JINMEI Tatuya
Browse files
[2506] resolved remaining conflicts on rebase
parent
b991213a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/lib/dns/master_lexer.cc
View file @
f70d131f
...
...
@@ -495,11 +495,11 @@ Number::handle(MasterLexer& lexer) const {
try
{
const
uint32_t
number32
=
boost
::
lexical_cast
<
uint32_t
,
const
char
*>
(
&
data
[
0
]);
token
=
Master
Lexer
::
Token
(
number32
);
token
=
MasterToken
(
number32
);
}
catch
(
const
boost
::
bad_lexical_cast
&
)
{
// Since we already know we have only digits,
// range should be the only possible problem.
token
=
Token
(
MasterToken
::
NUMBER_OUT_OF_RANGE
);
token
=
Master
Token
(
MasterToken
::
NUMBER_OUT_OF_RANGE
);
}
}
else
{
token
=
MasterToken
(
&
data
.
at
(
0
),
data
.
size
());
...
...
src/lib/dns/tests/master_lexer_token_unittest.cc
View file @
f70d131f
...
...
@@ -139,7 +139,7 @@ TEST_F(MasterLexerTokenTest, errors) {
EXPECT_EQ
(
"no token produced"
,
MasterToken
(
MasterToken
::
NO_TOKEN_PRODUCED
).
getErrorText
());
EXPECT_EQ
(
"number out of range"
,
Master
Lexer
::
Token
(
MasterToken
::
NUMBER_OUT_OF_RANGE
).
MasterToken
(
MasterToken
::
NUMBER_OUT_OF_RANGE
).
getErrorText
());
// getErrorCode/Text() isn't allowed for non number types
...
...
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