summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-19 11:44:20 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-19 11:59:04 (GMT)
commit1de12ed346fc0018527afe082886129088e27a95 (patch)
tree16013a9294588f505a559a99fe27a603584f2ac2 /Swiften/QA/NetworkTest
parent5d504472c63b7acaa7df99ff1097024cf463f1bd (diff)
downloadswift-1de12ed346fc0018527afe082886129088e27a95.zip
swift-1de12ed346fc0018527afe082886129088e27a95.tar.bz2
(Client)Session & Connection refactoring.
ClientSession no longer sets up a connection. Connection no longer resolves addresses.
Diffstat (limited to 'Swiften/QA/NetworkTest')
-rw-r--r--Swiften/QA/NetworkTest/BoostConnectionTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
index e38b895..9929eaa 100644
--- a/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
+++ b/Swiften/QA/NetworkTest/BoostConnectionTest.cpp
@@ -5,9 +5,13 @@
#include "Swiften/Base/String.h"
#include "Swiften/Base/sleep.h"
#include "Swiften/Network/BoostConnection.h"
+#include "Swiften/Network/HostAddress.h"
+#include "Swiften/Network/HostAddressPort.h"
#include "Swiften/Network/BoostIOServiceThread.h"
#include "Swiften/EventLoop/DummyEventLoop.h"
+const unsigned char* address = reinterpret_cast<const unsigned char*>("\x41\x63\xde\x89");
+
using namespace Swift;
class BoostConnectionTest : public CppUnit::TestFixture {
@@ -31,16 +35,15 @@ class BoostConnectionTest : public CppUnit::TestFixture {
void testDestructor() {
{
- std::string domain("el-tramo.be");
boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService()));
- testling->connect(domain);
+ testling->connect(HostAddressPort(HostAddress(address, 4), 5222));
}
}
void testDestructor_PendingEvents() {
{
boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService()));
- testling->connect("el-tramo.be");
+ testling->connect(HostAddressPort(HostAddress(address, 4), 5222));
while (!eventLoop_->hasEvents()) {
Swift::sleep(10);
}