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
Sebastian Schrader
Kea
Commits
99aed51b
Commit
99aed51b
authored
Nov 19, 2012
by
Michal 'vorner' Vaner
Browse files
[2375] Test ungetting after EOF
parent
12aac746
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/dns/tests/master_lexer_unittest.cc
View file @
99aed51b
...
...
@@ -268,6 +268,9 @@ TEST_F(MasterLexerTest, eof) {
EXPECT_EQ
(
MasterLexer
::
Token
::
END_OF_FILE
,
lexer
.
getNextToken
().
getType
());
// And it is not allowed to use this one any more.
EXPECT_THROW
(
lexer
.
getNextToken
(),
isc
::
InvalidOperation
);
// But if we unget a step back, we should get the EOF again
lexer
.
ungetToken
();
EXPECT_EQ
(
MasterLexer
::
Token
::
END_OF_FILE
,
lexer
.
getNextToken
().
getType
());
}
// Check we properly return error when there's an opened parentheses and no
...
...
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