summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-10-31 13:38:05 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-11-01 11:19:59 (GMT)
commit632c6c8dd641e74c62e9561770af0a66711bc3da (patch)
treebad7571fc8b7be8ef67ae139aec51a00100fc38d /QA/Swiften/NetworkTest/BoostConnectionTest.cpp
parentb353fac98e08d8f225781b95e55b80aa67171262 (diff)
downloadswift-contrib-632c6c8dd641e74c62e9561770af0a66711bc3da.zip
swift-contrib-632c6c8dd641e74c62e9561770af0a66711bc3da.tar.bz2
Moving tests around.
Diffstat (limited to 'QA/Swiften/NetworkTest/BoostConnectionTest.cpp')
-rw-r--r--QA/Swiften/NetworkTest/BoostConnectionTest.cpp59
1 files changed, 0 insertions, 59 deletions
diff --git a/QA/Swiften/NetworkTest/BoostConnectionTest.cpp b/QA/Swiften/NetworkTest/BoostConnectionTest.cpp
deleted file mode 100644
index 9929eaa..0000000
--- a/QA/Swiften/NetworkTest/BoostConnectionTest.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/extensions/TestFactoryRegistry.h>
-#include <boost/shared_ptr.hpp>
-
-#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 {
- CPPUNIT_TEST_SUITE(BoostConnectionTest);
- CPPUNIT_TEST(testDestructor);
- CPPUNIT_TEST(testDestructor_PendingEvents);
- CPPUNIT_TEST_SUITE_END();
-
- public:
- BoostConnectionTest() {}
-
- void setUp() {
- boostIOServiceThread_ = new BoostIOServiceThread();
- eventLoop_ = new DummyEventLoop();
- }
-
- void tearDown() {
- delete eventLoop_;
- delete boostIOServiceThread_;
- }
-
- void testDestructor() {
- {
- boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService()));
- testling->connect(HostAddressPort(HostAddress(address, 4), 5222));
- }
- }
-
- void testDestructor_PendingEvents() {
- {
- boost::shared_ptr<BoostConnection> testling(new BoostConnection(&boostIOServiceThread_->getIOService()));
- testling->connect(HostAddressPort(HostAddress(address, 4), 5222));
- while (!eventLoop_->hasEvents()) {
- Swift::sleep(10);
- }
- }
- eventLoop_->processEvents();
- }
-
- private:
- BoostIOServiceThread* boostIOServiceThread_;
- DummyEventLoop* eventLoop_;
-};
-
-CPPUNIT_TEST_SUITE_REGISTRATION(BoostConnectionTest);