summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Network/UnitTest')
-rw-r--r--Swiften/Network/UnitTest/HostAddressTest.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/Swiften/Network/UnitTest/HostAddressTest.cpp b/Swiften/Network/UnitTest/HostAddressTest.cpp
index b805647..50e9198 100644
--- a/Swiften/Network/UnitTest/HostAddressTest.cpp
+++ b/Swiften/Network/UnitTest/HostAddressTest.cpp
@@ -2,18 +2,23 @@
#include <cppunit/extensions/TestFactoryRegistry.h>
#include "Swiften/Network/HostAddress.h"
+#include "Swiften/Base/String.h"
using namespace Swift;
-class HostAddressTest : public CppUnit::TestFixture
-{
+class HostAddressTest : public CppUnit::TestFixture {
CPPUNIT_TEST_SUITE(HostAddressTest);
+ CPPUNIT_TEST(testConstructor);
CPPUNIT_TEST(testToString);
CPPUNIT_TEST(testToString_IPv6);
CPPUNIT_TEST_SUITE_END();
public:
- HostAddressTest() {}
+ void testConstructor() {
+ HostAddress testling("192.168.1.254");
+
+ CPPUNIT_ASSERT_EQUAL(std::string("192.168.1.254"), testling.toString());
+ }
void testToString() {
unsigned char address[4] = {10, 0, 1, 253};