]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[1186] Fix problems when compiling with gcc 4.4.5
authorStephen Morris <stephen@isc.org>
Thu, 13 Oct 2011 15:08:39 +0000 (16:08 +0100)
committerTomek Mrugalski <tomasz@isc.org>
Fri, 14 Oct 2011 14:31:14 +0000 (16:31 +0200)
src/lib/dhcp/tests/libdhcp_unittest.cc
src/lib/dhcp/tests/option6_iaaddr_unittest.cc

index 23f91695f1e7c449c833a9d61dc335b4c399f8ed..d9d7c47408935cc0d4a3a78075ea407d7a0ed798 100644 (file)
@@ -92,46 +92,46 @@ TEST_F(LibDhcpTest, unpackOptions6) {
     EXPECT_EQ(options.size(), 5); // there should be 5 options
 
     isc::dhcp::Option::Option6Collection::const_iterator x = options.find(12);
-    ASSERT_NE(x, options.end()); // option 1 should exist
+    ASSERT_FALSE(x == options.end()); // option 1 should exist
     EXPECT_EQ(12, x->second->getType());  // this should be option 12
     ASSERT_EQ(9, x->second->len()); // it should be of length 9
     EXPECT_EQ(0, memcmp(x->second->getData(), packed+4, 5)); // data len=5
 
     x = options.find(13);
-    ASSERT_NE(x, options.end()); // option 13 should exist
+    ASSERT_FALSE(x == options.end()); // option 13 should exist
     EXPECT_EQ(13, x->second->getType());  // this should be option 13
     ASSERT_EQ(7, x->second->len()); // it should be of length 7
     EXPECT_EQ(0, memcmp(x->second->getData(), packed+13, 3)); // data len=3
 
     x = options.find(14);
-    ASSERT_NE(x, options.end()); // option 3 should exist
+    ASSERT_FALSE(x == options.end()); // option 3 should exist
     EXPECT_EQ(14, x->second->getType());  // this should be option 14
     ASSERT_EQ(6, x->second->len()); // it should be of length 6
     EXPECT_EQ(0, memcmp(x->second->getData(), packed+20, 2)); // data len=2
 
     x = options.find(256);
-    ASSERT_NE(x, options.end()); // option 256 should exist
+    ASSERT_FALSE(x == options.end()); // option 256 should exist
     EXPECT_EQ(256, x->second->getType());  // this should be option 256
     ASSERT_EQ(8, x->second->len()); // it should be of length 7
     EXPECT_EQ(0, memcmp(x->second->getData(), packed+26, 4)); // data len=4
 
     x = options.find(257);
-    ASSERT_NE(x, options.end()); // option 257 should exist
+    ASSERT_FALSE(x == options.end()); // option 257 should exist
     EXPECT_EQ(257, x->second->getType());  // this should be option 257
     ASSERT_EQ(5, x->second->len()); // it should be of length 5
     EXPECT_EQ(0, memcmp(x->second->getData(), packed+34, 1)); // data len=1
 
     x = options.find(0);
-    EXPECT_EQ(x, options.end()); // option 0 not found
+    EXPECT_TRUE(x == options.end()); // option 0 not found
 
     x = options.find(1); // 1 is htons(256) on little endians. Worth checking
-    EXPECT_EQ(x, options.end()); // option 1 not found
+    EXPECT_TRUE(x == options.end()); // option 1 not found
 
     x = options.find(2);
-    EXPECT_EQ(x, options.end()); // option 2 not found
+    EXPECT_TRUE(x == options.end()); // option 2 not found
 
     x = options.find(32000);
-    EXPECT_EQ(x, options.end()); // option 32000 not found
+    EXPECT_TRUE(x == options.end()); // option 32000 not found
 }
 
 }
index 3003427feaeff8e92dd5ec5d2899922ef42117f8..f92304ef56bdc67dd2ca0682580c9260510f7d93 100644 (file)
@@ -76,7 +76,7 @@ TEST_F(Option6IAAddrTest, basic) {
     // 4 bytes header + 4 bytes content
     EXPECT_EQ("2001:db8:1::dead:beef", opt->getAddress().toText());
     EXPECT_EQ(1000, opt->getPreferred());
-    EXPECT_EQ(3000000000, opt->getValid());
+    EXPECT_EQ(3000000000U, opt->getValid());
 
     EXPECT_EQ(D6O_IAADDR, opt->getType());