[svn] commit: r1016 - /trunk/src/lib/dns/cpp/tests/rrsetlist_unittest.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Feb 26 23:26:14 UTC 2010


Author: jinmei
Date: Fri Feb 26 23:26:14 2010
New Revision: 1016

Log:
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.

Modified:
    trunk/src/lib/dns/cpp/tests/rrsetlist_unittest.cc

Modified: trunk/src/lib/dns/cpp/tests/rrsetlist_unittest.cc
==============================================================================
--- trunk/src/lib/dns/cpp/tests/rrsetlist_unittest.cc (original)
+++ trunk/src/lib/dns/cpp/tests/rrsetlist_unittest.cc Fri Feb 26 23:26:14 2010
@@ -110,6 +110,15 @@
 
     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 @@
 }
 
 }
-




More information about the bind10-changes mailing list