Skip to content

Commit

Permalink
Test get-host-by-name with invalid hostname
Browse files Browse the repository at this point in the history
  • Loading branch information
ropez committed Mar 4, 2010
1 parent afde5e6 commit 0b86b06
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/test/test_inet_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ class TestInetAddress : public CppUnit::TestFixture
void testGetHostByName() {
InetAddress addr = InetAddress::getHostByName("localhost");
CPPUNIT_ASSERT_EQUAL(std::string("127.0.0.1"), addr.toString());

CPPUNIT_ASSERT(InetAddress::getHostByName("").isNull());
}
};
CPPUNIT_TEST_SUITE_REGISTRATION(TestInetAddress);

0 comments on commit 0b86b06

Please sign in to comment.