Browse Source

[2498] Add another HINFO test

and remove some code that should not have been committed
Jelte Jansen 12 years ago
parent
commit
9a0d024c97

+ 0 - 4
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

+ 0 - 1
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()
     ///

+ 2 - 0
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) {