BIND 10 trac1186, updated. 516fca538ba6307d90cc3ac197871de91e092955 [1186] Fix problems when compiling with gcc 4.4.5
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Oct 13 15:09:15 UTC 2011
The branch, trac1186 has been updated
via 516fca538ba6307d90cc3ac197871de91e092955 (commit)
from 1290727873e865d943467857eec67938bd5e8a0a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 516fca538ba6307d90cc3ac197871de91e092955
Author: Stephen Morris <stephen at isc.org>
Date: Thu Oct 13 16:08:39 2011 +0100
[1186] Fix problems when compiling with gcc 4.4.5
-----------------------------------------------------------------------
Summary of changes:
src/lib/dhcp/tests/libdhcp_unittest.cc | 18 +++++++++---------
src/lib/dhcp/tests/option6_iaaddr_unittest.cc | 2 +-
2 files changed, 10 insertions(+), 10 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dhcp/tests/libdhcp_unittest.cc b/src/lib/dhcp/tests/libdhcp_unittest.cc
index 23f9169..d9d7c47 100644
--- a/src/lib/dhcp/tests/libdhcp_unittest.cc
+++ b/src/lib/dhcp/tests/libdhcp_unittest.cc
@@ -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
}
}
diff --git a/src/lib/dhcp/tests/option6_iaaddr_unittest.cc b/src/lib/dhcp/tests/option6_iaaddr_unittest.cc
index 3003427..f92304e 100644
--- a/src/lib/dhcp/tests/option6_iaaddr_unittest.cc
+++ b/src/lib/dhcp/tests/option6_iaaddr_unittest.cc
@@ -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());
More information about the bind10-changes
mailing list