diff options
Diffstat (limited to 'src/mongo/dbtests/socktests.cpp')
-rw-r--r-- | src/mongo/dbtests/socktests.cpp | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/src/mongo/dbtests/socktests.cpp b/src/mongo/dbtests/socktests.cpp index a4563d47ed8..baa633e7e3c 100644 --- a/src/mongo/dbtests/socktests.cpp +++ b/src/mongo/dbtests/socktests.cpp @@ -37,28 +37,27 @@ namespace SockTests { - class HostByName { - public: - void run() { - ASSERT_EQUALS( "127.0.0.1", hostbyname( "localhost" ) ); - ASSERT_EQUALS( "127.0.0.1", hostbyname( "127.0.0.1" ) ); - // ASSERT_EQUALS( "::1", hostbyname( "::1" ) ); // IPv6 disabled at runtime by default. - - HostAndPort h("asdfasdfasdf_no_such_host"); - // this fails uncomment when fixed. - ASSERT(!mongo::repl::isSelf(h)); - } - }; - - class All : public Suite { - public: - All() : Suite( "sock" ) {} - void setupTests() { - add< HostByName >(); - } - }; - - SuiteInstance<All> myall; - -} // namespace SockTests - +class HostByName { +public: + void run() { + ASSERT_EQUALS("127.0.0.1", hostbyname("localhost")); + ASSERT_EQUALS("127.0.0.1", hostbyname("127.0.0.1")); + // ASSERT_EQUALS( "::1", hostbyname( "::1" ) ); // IPv6 disabled at runtime by default. + + HostAndPort h("asdfasdfasdf_no_such_host"); + // this fails uncomment when fixed. + ASSERT(!mongo::repl::isSelf(h)); + } +}; + +class All : public Suite { +public: + All() : Suite("sock") {} + void setupTests() { + add<HostByName>(); + } +}; + +SuiteInstance<All> myall; + +} // namespace SockTests |