From: Jelte Jansen Date: Mon, 14 Jan 2013 16:08:28 +0000 (+0100) Subject: [2498] Add another HINFO test X-Git-Tag: bind10-1.0.0-rc-release~100^2~4^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9a0d024c97ba896c577d59db04a0337d3c70221a;p=thirdparty%2Fkea.git [2498] Add another HINFO test and remove some code that should not have been committed --- diff --git a/src/lib/dns/rdata/generic/hinfo_13.cc b/src/lib/dns/rdata/generic/hinfo_13.cc index 07649517ee..319ec7d2d3 100644 --- a/src/lib/dns/rdata/generic/hinfo_13.cc +++ b/src/lib/dns/rdata/generic/hinfo_13.cc @@ -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 diff --git a/src/lib/dns/rdata/generic/hinfo_13.h b/src/lib/dns/rdata/generic/hinfo_13.h index a2018f5bf6..60404c91b2 100644 --- a/src/lib/dns/rdata/generic/hinfo_13.h +++ b/src/lib/dns/rdata/generic/hinfo_13.h @@ -52,7 +52,6 @@ public: const std::string getCPU() const; const std::string getOS() const; - void ptr() const; private: /// Helper template function for toWire() /// diff --git a/src/lib/dns/tests/rdata_hinfo_unittest.cc b/src/lib/dns/tests/rdata_hinfo_unittest.cc index 0bea477564..7be2cb6026 100644 --- a/src/lib/dns/tests/rdata_hinfo_unittest.cc +++ b/src/lib/dns/tests/rdata_hinfo_unittest.cc @@ -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) {