Browse Source

[1485] Minor changes after review:

 - IOAddress test renamed
 - flipped isV6() with !isV4() in perfdhcp/test_control.cc
Tomek Mrugalski 11 years ago
parent
commit
7aa18afc3a

+ 3 - 2
src/lib/asiolink/tests/io_address_unittest.cc

@@ -183,8 +183,9 @@ TEST(IOAddressTest, LeftShiftOperator) {
     EXPECT_EQ(addr.toText(), oss.str());
 }
 
-// test v6-specific operations
-TEST(IOAddressTest, v6specific) {
+// Tests address classification methods (which were previously used by accessing
+// underlying asio objects directly)
+TEST(IOAddressTest, accessClassificationMethods) {
     IOAddress addr1("192.0.2.5"); // IPv4
     IOAddress addr2("::");  // IPv6
     IOAddress addr3("2001:db8::1"); // global IPv6

+ 1 - 1
tests/tools/perfdhcp/test_control.cc

@@ -1642,7 +1642,7 @@ TestControl::sendRequest4(const TestControlSocket& socket,
 
     /// Set client address.
     asiolink::IOAddress yiaddr = offer_pkt4->getYiaddr();
-    if (yiaddr.isV6()) {
+    if (!yiaddr.isV4()) {
         isc_throw(BadValue, "the YIADDR returned in OFFER packet is not "
                   " IPv4 address");
     }