BIND 10 trac998, updated. ea15d26afc9ced4a11aea6733ea3df0969c5618b [trac998] cover things by an unnamed namespace as much as possible.

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Jun 23 18:40:21 UTC 2011


The branch, trac998 has been updated
       via  ea15d26afc9ced4a11aea6733ea3df0969c5618b (commit)
      from  f685e5c06c382180eb1775bce714ea60154b08f2 (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 ea15d26afc9ced4a11aea6733ea3df0969c5618b
Author: JINMEI Tatuya <jinmei at isc.org>
Date:   Thu Jun 23 11:39:47 2011 -0700

    [trac998] cover things by an unnamed namespace as much as possible.

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

Summary of changes:
 src/lib/acl/tests/ip_check_unittest.cc |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/acl/tests/ip_check_unittest.cc b/src/lib/acl/tests/ip_check_unittest.cc
index 57a7268..3fcb05b 100644
--- a/src/lib/acl/tests/ip_check_unittest.cc
+++ b/src/lib/acl/tests/ip_check_unittest.cc
@@ -23,7 +23,6 @@ using namespace std;
 namespace {
 const size_t IPV4_SIZE = 4;
 const size_t IPV6_SIZE = 16;
-}
 
 // Simple struct holding either an IPV4 or IPV6 address.  This is the "Context"
 // used for the tests.
@@ -94,6 +93,7 @@ struct GeneralAddress {
         return (false);
     }
 };
+} // Unnamed namespace
 
 // Provide a specialisation of the IPCheck::matches() method for the
 // GeneralAddress class.
@@ -107,6 +107,7 @@ bool IPCheck<GeneralAddress>::matches(const GeneralAddress& address) const {
 } // namespace acl
 } // namespace isc
 
+namespace {
 /// *** Free Function Tests ***
 
 // Test the createMask() function.
@@ -308,8 +309,6 @@ TEST(IPCheck, V4Compare) {
 
 // Some constants used in the tests
 
-namespace {
-
 const char* V6ADDR_1_STRING = "2001:0db8:1122:3344:5566:7788:99aa:bbcc";
 const uint8_t V6ADDR_1[] = {
     0x20, 0x01, 0x0d, 0xb8, 0x11, 0x22, 0x33, 0x44,
@@ -368,8 +367,6 @@ const uint8_t V6ADDR_4[] = {
     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
 };
 
-} // Anonymous namespace
-
 TEST(IPCheck, V6StringConstructor) {
     IPCheck<GeneralAddress> acl1(V6ADDR_1_STRING);
     vector<uint8_t> address = acl1.getAddress();
@@ -588,3 +585,4 @@ TEST(IPCheck, MixedMode) {
     GeneralAddress test6(vector<uint8_t>(V6ADDR_1, V6ADDR_1 + IPV6_SIZE));
     EXPECT_FALSE(acl6.matches(test6));
 }
+} // Unnamed namespace




More information about the bind10-changes mailing list