]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[2498] Add another HINFO test
authorJelte Jansen <jelte@isc.org>
Mon, 14 Jan 2013 16:08:28 +0000 (17:08 +0100)
committerJelte Jansen <jelte@isc.org>
Mon, 14 Jan 2013 16:08:28 +0000 (17:08 +0100)
and remove some code that should not have been committed

src/lib/dns/rdata/generic/hinfo_13.cc
src/lib/dns/rdata/generic/hinfo_13.h
src/lib/dns/tests/rdata_hinfo_unittest.cc

index 07649517ee1c7b23c1ee553f019f9e7377fdb746..319ec7d2d32314a1eecc3ca7ee472848a88473af 100644 (file)
@@ -155,9 +155,5 @@ HINFO::toWireHelper(T& outputer) const {
     outputer.writeData(&impl_->os[0], impl_->os.size());
 }
 
-void HINFO::ptr() const {
-    std::cout << "[XX] PTR: " << impl_.get() << std::endl;
-}
-
 // END_RDATA_NAMESPACE
 // END_ISC_NAMESPACE
index a2018f5bf6c4d9e2abf4e023257f394fca9c982e..60404c91b2eb91e034f4fea946b146176323afe4 100644 (file)
@@ -52,7 +52,6 @@ public:
     const std::string getCPU() const;
     const std::string getOS() const;
 
-    void ptr() const;
 private:
     /// Helper template function for toWire()
     ///
index 0bea4775642ef8da7517ec0516d353bfd294b4cb..7be2cb60263d1009b9330f5b89041ed02f759ba8 100644 (file)
@@ -107,6 +107,8 @@ TEST_F(Rdata_HINFO_Test, toText) {
     EXPECT_EQ("\"a\" \"b\"", HINFO("a b").toText());
     // will not add additional quotes
     EXPECT_EQ("\"a\" \"b\"", HINFO("\"a\" \"b\"").toText());
+    // And make sure escaped quotes and spaces are left intact
+    EXPECT_EQ("\"a\\\"\" \"b c\"", HINFO("\"a\\\"\" \"b c\"").toText());
 }
 
 TEST_F(Rdata_HINFO_Test, toWire) {