diff options
author | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 00:22:50 -0400 |
---|---|---|
committer | Mark Benvenuto <mark.benvenuto@mongodb.com> | 2015-06-20 10:56:02 -0400 |
commit | 9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch) | |
tree | 3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/repl/isself_test.cpp | |
parent | 01965cf52bce6976637ecb8f4a622aeb05ab256a (diff) | |
download | mongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz |
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/repl/isself_test.cpp')
-rw-r--r-- | src/mongo/db/repl/isself_test.cpp | 58 |
1 files changed, 27 insertions, 31 deletions
diff --git a/src/mongo/db/repl/isself_test.cpp b/src/mongo/db/repl/isself_test.cpp index b3af1721e62..b6a3e26f8e6 100644 --- a/src/mongo/db/repl/isself_test.cpp +++ b/src/mongo/db/repl/isself_test.cpp @@ -40,45 +40,41 @@ namespace repl { namespace { - using std::string; +using std::string; - TEST(IsSelf, DetectsSameHostIPv4) { +TEST(IsSelf, DetectsSameHostIPv4) { #if defined(_WIN32) || defined(__linux__) || defined(__APPLE__) - bool wasEnabled = IPv6Enabled(); - enableIPv6(false); - ON_BLOCK_EXIT(enableIPv6, wasEnabled); - // first we get the addrs bound on this host - const std::vector<std::string> addrs = getBoundAddrs(false); - // Fastpath should agree with the result of getBoundAddrs - // since it uses it... - for (std::vector<string>::const_iterator it = addrs.begin(); - it != addrs.end(); ++it) { - - ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port))); - } + bool wasEnabled = IPv6Enabled(); + enableIPv6(false); + ON_BLOCK_EXIT(enableIPv6, wasEnabled); + // first we get the addrs bound on this host + const std::vector<std::string> addrs = getBoundAddrs(false); + // Fastpath should agree with the result of getBoundAddrs + // since it uses it... + for (std::vector<string>::const_iterator it = addrs.begin(); it != addrs.end(); ++it) { + ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port))); + } #else - ASSERT(true); + ASSERT(true); #endif - } +} - TEST(IsSelf, DetectsSameHostIPv6) { +TEST(IsSelf, DetectsSameHostIPv6) { #if defined(_WIN32) || defined(__linux__) || defined(__APPLE__) - bool wasEnabled = IPv6Enabled(); - enableIPv6(true); - ON_BLOCK_EXIT(enableIPv6, wasEnabled); - // first we get the addrs bound on this host - const std::vector<std::string> addrs = getBoundAddrs(true); - // Fastpath should agree with the result of getBoundAddrs - // since it uses it... - for (std::vector<string>::const_iterator it = addrs.begin(); - it != addrs.end(); ++it) { - - ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port))); - } + bool wasEnabled = IPv6Enabled(); + enableIPv6(true); + ON_BLOCK_EXIT(enableIPv6, wasEnabled); + // first we get the addrs bound on this host + const std::vector<std::string> addrs = getBoundAddrs(true); + // Fastpath should agree with the result of getBoundAddrs + // since it uses it... + for (std::vector<string>::const_iterator it = addrs.begin(); it != addrs.end(); ++it) { + ASSERT(isSelf(HostAndPort(*it, serverGlobalParams.port))); + } #else - ASSERT(true); + ASSERT(true); #endif - } +} } // namespace |