BIND 10 master, updated. 4f992e158c48eba97d4cfd497a1abba12336e38d [master] fix build with clang

BIND 10 source code commits bind10-changes at lists.isc.org
Tue Feb 15 14:00:51 UTC 2011


The branch, master has been updated
       via  4f992e158c48eba97d4cfd497a1abba12336e38d (commit)
      from  496a0353cded1f60342e7713c28fecdffcecbbbe (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 4f992e158c48eba97d4cfd497a1abba12336e38d
Author: Jelte Jansen <jelte at isc.org>
Date:   Tue Feb 15 13:59:42 2011 +0000

    [master] fix build with clang
    
    by splitting up test helper inclusion files

-----------------------------------------------------------------------

Summary of changes:
 ...he_test_util.h => cache_test_messagefromfile.h} |   18 ------------------
 ...cache_test_util.h => cache_test_sectioncount.h} |   13 -------------
 src/lib/cache/tests/local_zone_data_unittest.cc    |    2 +-
 src/lib/cache/tests/message_cache_unittest.cc      |    2 +-
 src/lib/cache/tests/message_entry_unittest.cc      |    3 ++-
 src/lib/cache/tests/resolver_cache_unittest.cc     |    2 +-
 6 files changed, 5 insertions(+), 35 deletions(-)
 copy src/lib/cache/tests/{cache_test_util.h => cache_test_messagefromfile.h} (74%)
 rename src/lib/cache/tests/{cache_test_util.h => cache_test_sectioncount.h} (79%)

-----------------------------------------------------------------------
diff --git a/src/lib/cache/tests/cache_test_messagefromfile.h b/src/lib/cache/tests/cache_test_messagefromfile.h
new file mode 100644
index 0000000..820d822
--- /dev/null
+++ b/src/lib/cache/tests/cache_test_messagefromfile.h
@@ -0,0 +1,40 @@
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+// $Id$
+#include <vector>
+#include <dns/tests/unittest_util.h>
+#include <dns/buffer.h>
+#include <dns/message.h>
+
+using namespace isc;
+using namespace isc::dns;
+
+namespace {
+
+/// \brief Reads a Message from a data file
+///
+/// \param message Message to put the read data in
+/// \param datafile The file to read from
+void
+messageFromFile(Message& message, const char* datafile) {
+    std::vector<unsigned char> data;
+    UnitTestUtil::readWireData(datafile, data);
+
+    InputBuffer buffer(&data[0], data.size());
+    message.fromWire(buffer);
+}
+
+}   // namespace
+
diff --git a/src/lib/cache/tests/cache_test_sectioncount.h b/src/lib/cache/tests/cache_test_sectioncount.h
new file mode 100644
index 0000000..9583805
--- /dev/null
+++ b/src/lib/cache/tests/cache_test_sectioncount.h
@@ -0,0 +1,45 @@
+// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
+//
+// Permission to use, copy, modify, and/or distribute this software for any
+// purpose with or without fee is hereby granted, provided that the above
+// copyright notice and this permission notice appear in all copies.
+//
+// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
+// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
+// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+// PERFORMANCE OF THIS SOFTWARE.
+
+// $Id$
+#include <vector>
+#include <dns/tests/unittest_util.h>
+#include <dns/buffer.h>
+#include <dns/message.h>
+
+using namespace isc;
+using namespace isc::dns;
+
+namespace {
+
+/// \brief Counts the number of rrsets in the given section
+///
+/// \param msg The message to count in
+/// \param section The section to count
+///
+/// \return The number of RRsets in the given section
+int
+sectionRRsetCount(Message& msg, Message::Section section) {
+    int count = 0;
+    for (RRsetIterator rrset_iter = msg.beginSection(section);
+         rrset_iter != msg.endSection(section); 
+         ++rrset_iter) {
+        ++count;
+    }
+
+    return count;
+}
+
+}   // namespace
+
diff --git a/src/lib/cache/tests/cache_test_util.h b/src/lib/cache/tests/cache_test_util.h
deleted file mode 100644
index ed9988b..0000000
--- a/src/lib/cache/tests/cache_test_util.h
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright (C) 2010  Internet Systems Consortium, Inc. ("ISC")
-//
-// Permission to use, copy, modify, and/or distribute this software for any
-// purpose with or without fee is hereby granted, provided that the above
-// copyright notice and this permission notice appear in all copies.
-//
-// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
-// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
-// AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
-// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
-// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
-// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-// PERFORMANCE OF THIS SOFTWARE.
-
-// $Id$
-#include <vector>
-#include <dns/tests/unittest_util.h>
-#include <dns/buffer.h>
-#include <dns/message.h>
-
-using namespace isc;
-using namespace isc::dns;
-
-namespace {
-
-/// \brief Reads a Message from a data file
-///
-/// \param message Message to put the read data in
-/// \param datafile The file to read from
-void
-messageFromFile(Message& message, const char* datafile) {
-    std::vector<unsigned char> data;
-    UnitTestUtil::readWireData(datafile, data);
-
-    InputBuffer buffer(&data[0], data.size());
-    message.fromWire(buffer);
-}
-
-/// \brief Counts the number of rrsets in the given section
-///
-/// \param msg The message to count in
-/// \param section The section to count
-///
-/// \return The number of RRsets in the given section
-int
-sectionRRsetCount(Message& msg, Message::Section section) {
-    int count = 0;
-    for (RRsetIterator rrset_iter = msg.beginSection(section);
-         rrset_iter != msg.endSection(section); 
-         ++rrset_iter) {
-        ++count;
-    }
-
-    return count;
-}
-
-}   // namespace
-
diff --git a/src/lib/cache/tests/local_zone_data_unittest.cc b/src/lib/cache/tests/local_zone_data_unittest.cc
index 01e035b..28de4be 100644
--- a/src/lib/cache/tests/local_zone_data_unittest.cc
+++ b/src/lib/cache/tests/local_zone_data_unittest.cc
@@ -19,7 +19,7 @@
 #include <cache/local_zone_data.h>
 #include <dns/rrset.h>
 #include <dns/rrttl.h>
-#include "cache_test_util.h"
+#include "cache_test_messagefromfile.h"
 
 using namespace isc::cache;
 using namespace isc::dns;
diff --git a/src/lib/cache/tests/message_cache_unittest.cc b/src/lib/cache/tests/message_cache_unittest.cc
index ed6ebc4..f984312 100644
--- a/src/lib/cache/tests/message_cache_unittest.cc
+++ b/src/lib/cache/tests/message_cache_unittest.cc
@@ -21,7 +21,7 @@
 #include "../message_cache.h"
 #include "../rrset_cache.h"
 #include "../resolver_cache.h"
-#include "cache_test_util.h"
+#include "cache_test_messagefromfile.h"
 
 using namespace isc::cache;
 using namespace isc;
diff --git a/src/lib/cache/tests/message_entry_unittest.cc b/src/lib/cache/tests/message_entry_unittest.cc
index 48a02b9..f0fc777 100644
--- a/src/lib/cache/tests/message_entry_unittest.cc
+++ b/src/lib/cache/tests/message_entry_unittest.cc
@@ -22,7 +22,8 @@
 #include "../message_entry.h"
 #include "../rrset_cache.h"
 #include "../resolver_cache.h"
-#include "cache_test_util.h"
+#include "cache_test_messagefromfile.h"
+#include "cache_test_sectioncount.h"
 
 using namespace isc::cache;
 using namespace isc;
diff --git a/src/lib/cache/tests/resolver_cache_unittest.cc b/src/lib/cache/tests/resolver_cache_unittest.cc
index 6621df0..a3cf728 100644
--- a/src/lib/cache/tests/resolver_cache_unittest.cc
+++ b/src/lib/cache/tests/resolver_cache_unittest.cc
@@ -18,7 +18,7 @@
 #include <gtest/gtest.h>
 #include <dns/rrset.h>
 #include "resolver_cache.h"
-#include "cache_test_util.h"
+#include "cache_test_messagefromfile.h"
 
 using namespace isc::cache;
 using namespace isc::dns;




More information about the bind10-changes mailing list