Commit 38c66b96 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[2389] added test cases involving internal lexer error.

parent bd43cb2e
......@@ -82,6 +82,11 @@ TEST_F(Rdata_IN_A_Test, createFromText) {
// a valid address surrounded by parentheses; only okay with lexer
checkFromTextIN_A("(192.0.2.1)", true, false);
// input that would cause lexer-specific error; it's bad text as an
// address so should result in the string version, too.
checkFromText<in::A, InvalidRdataText, MasterLexer::LexerError>(
")192.0.2.1", rdata_in_a);
}
TEST_F(Rdata_IN_A_Test, createFromWire) {
......
......@@ -83,6 +83,11 @@ TEST_F(Rdata_IN_AAAA_Test, createFromText) {
// a valid address surrounded by parentheses; only okay with lexer
checkFromTextIN_AAAA("(2001:db8::1234)", true, false);
// input that would cause lexer-specific error; it's bad text as an
// address so should result in the string version, too.
checkFromText<in::AAAA, InvalidRdataText, MasterLexer::LexerError>(
")2001:db8::1234", rdata_in_aaaa);
}
TEST_F(Rdata_IN_AAAA_Test, createFromWire) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment