Commit 4ae9174b authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

added tests that would fail (commented out)


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1455 e5f2f494-b856-4b98-b285-d166d9295462
parent ca6785f7
......@@ -73,13 +73,15 @@ TEST_F(Rdata_DNSKEY_Test, badText)
InvalidRdataText);
EXPECT_THROW(generic::DNSKEY("257 3 5 BAAAAAAAAAAAD"),
BadBase64String);
// Should this be allowed?
// EXPECT_THROW(generic::DNSKEY("257 3 5BEAAEFTd"),
// InvalidRdataText);
#if 0
// Should this be allowed? Probably not. But the test currently fails.
EXPECT_THROW(generic::DNSKEY("257 3 5BEAAEFTd"),
InvalidRdataText);
// How about this? It's even more confusing for the parser because
// it could be ambiguous '51 EAAA' vs '5 1EAA..'
// EXPECT_THROW(generic::DNSKEY("257 3 51EAAEFTd"),
// InvalidRdataText);
EXPECT_THROW(generic::DNSKEY("257 3 51EAAEFTd"),
InvalidRdataText);
#endif
}
TEST_F(Rdata_DNSKEY_Test, toWireRenderer)
......
......@@ -52,6 +52,13 @@ TEST_F(Rdata_DS_Test, badText_DS) {
EXPECT_THROW(const generic::DS ds2("11111 5 22222 BEEF"), InvalidRdataText);
EXPECT_THROW(const generic::DS ds2("11111 5 2"), InvalidRdataText);
EXPECT_THROW(const generic::DS ds2("GARBAGE IN"), InvalidRdataText);
#if 0 // this test currently fails
// no space between the digest type and the digest.
EXPECT_THROW(const generic::DS ds2(
"12892 5 2F1E184C0E1D615D20EB3C223ACED3B03C773DD952D"
"5F0EB5C777586DE18DA6B5"), InvalidRdataText);
#endif
}
TEST_F(Rdata_DS_Test, createFromWire_DS) {
......
......@@ -72,6 +72,12 @@ TEST_F(Rdata_NSEC3_Test, badText)
"0123456789ABCDEFGHIJKLMNOPQRSTUV "
"A NS SOA"),
InvalidRdataText);
#if 0 // this currently fails
EXPECT_THROW(generic::NSEC3(
"1 1 1D399EAAB H9RSFB7FPF2L8HG35CMPC765TDK23RP6 "
"NS SOA RRSIG DNSKEY NSEC3PARAM"), InvalidRdataText);
#endif
}
TEST_F(Rdata_NSEC3_Test, createFromWire)
......
......@@ -49,16 +49,15 @@ TEST_F(Rdata_NSEC3PARAM_Test, toText)
TEST_F(Rdata_NSEC3PARAM_Test, badText)
{
EXPECT_THROW(generic::NSEC3PARAM rdata_nsec3param("1 1 1 SPORK"),
BadHexString);
EXPECT_THROW(generic::NSEC3PARAM rdata_nsec3param("100000 1 1 ADDAFEE"),
InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM rdata_nsec3param("1 100000 1 ADDAFEE"),
InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM rdata_nsec3param("1 1 100000 ADDAFEE"),
InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM rdata_nsec3param("1"),
InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM("1 1 1 SPORK"), BadHexString);
EXPECT_THROW(generic::NSEC3PARAM("100000 1 1 ADDAFEE"), InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM("1 100000 1 ADDAFEE"), InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM("1 1 100000 ADDAFEE"), InvalidRdataText);
EXPECT_THROW(generic::NSEC3PARAM("1"), InvalidRdataText);
#if 0 // this currently fails
EXPECT_THROW(generic::NSEC3PARAM("1 0 1D399EAAB"), InvalidRdataText);
#endif
}
TEST_F(Rdata_NSEC3PARAM_Test, createFromWire)
......
......@@ -87,6 +87,12 @@ TEST_F(Rdata_RRSIG_Test, badText)
"20100223214617 20100222214617 8496 isc.org. "
"EEeeeeeeEEEeeeeeeGaaahAAAAAAAAHHHHHHHHHHH!="),
BadBase64String);
#if 0 // this currently fails
// no space between the tag and signer
EXPECT_THROW(generic::RRSIG("A 5 4 43200 20100223214617 20100222214617 "
"8496isc.org. ofc="), InvalidRdataText);
#endif
}
TEST_F(Rdata_RRSIG_Test, toWireRenderer)
......
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