]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3624] Address review comments.
authorMarcin Siodelski <marcin@isc.org>
Mon, 8 Dec 2014 18:35:38 +0000 (19:35 +0100)
committerMarcin Siodelski <marcin@isc.org>
Mon, 8 Dec 2014 18:35:38 +0000 (19:35 +0100)
Removed the leftover debugging statement. Also, added some more commentary
to the test checking behavior for too long FQDNs.

src/lib/dhcp/tests/option6_client_fqdn_unittest.cc

index 4bbc1bd8debe0fea6097242a5cb77eea20f17218..b353156ab3949bff7a221babeab74710ce9a7220 100644 (file)
@@ -191,17 +191,16 @@ TEST(Option6ClientFqdnTest, constructFromWireTooLongLabel) {
 // is over 255.
 TEST(Option6ClientFqdnTest, constructFromWireTooLongDomainName) {
     OptionBuffer in_buf(Option6ClientFqdn::FLAG_S);
+    // Construct the FQDN from 26 labels, each having a size of 10.
     for (int i = 0; i < 26;  ++i) {
+        // Append the length of each label.
         in_buf.push_back(10);
+        // Append the actual label.
         in_buf.insert(in_buf.end(), 10, 109);
     }
+    // Terminate FQDN with a dot.
     in_buf.push_back(0);
 
-    try {
-        Option6ClientFqdn(in_buf.begin(), in_buf.end());
-    } catch (const Exception& ex) {
-        std::cout << ex.what() << std::endl;
-    }
     EXPECT_THROW(Option6ClientFqdn(in_buf.begin(), in_buf.end()),
                  InvalidOption6FqdnDomainName);
 }