Parcourir la source

added a test case highlighting using the default parameter for
findRRset(type/class) isn't really a good idea.
the test would crash, so commented it out for now.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@1016 e5f2f494-b856-4b98-b285-d166d9295462

JINMEI Tatuya il y a 15 ans
Parent
commit
3fe2c34795
1 fichiers modifiés avec 9 ajouts et 1 suppressions
  1. 9 1
      src/lib/dns/cpp/tests/rrsetlist_unittest.cc

+ 9 - 1
src/lib/dns/cpp/tests/rrsetlist_unittest.cc

@@ -110,6 +110,15 @@ TEST_F(RRsetListTest, randomAccess) {
 
     p = list[RRType::SOA()];
     EXPECT_EQ(p->getType(), RRType::SOA());
+
+    // What should this be?
+    p = RRsetPtr(new RRset(Name("example.com"), RRClass::CH(),
+                           RRType::DNAME(), RRTTL(3600)));
+    list.addRRset(p);
+    p = list[RRType::DNAME()];
+    //This will crash, but it's counter intuitive, isn't it?  We added a DNAME
+    //RRset and fetched a DNAME RRset in the list.  Why can't it succeed?
+    //EXPECT_EQ(p->getType(), RRType::DNAME());
 }
 
 TEST_F(RRsetListTest, findRRset) {
@@ -165,4 +174,3 @@ TEST_F(RRsetListTest, iterate) {
 }
 
 }
-