summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp')
-rw-r--r--Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
index 544bdad..7b61cb5 100644
--- a/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
+++ b/Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp
@@ -9,11 +9,11 @@
#include <vector>
#include <boost/bind.hpp>
-#include "Swiften/Disco/EntityCapsManager.h"
-#include "Swiften/Disco/CapsProvider.h"
-#include "Swiften/Elements/CapsInfo.h"
-#include "Swiften/Client/DummyStanzaChannel.h"
-#include "Swiften/Disco/CapsInfoGenerator.h"
+#include <Swiften/Disco/EntityCapsManager.h>
+#include <Swiften/Disco/CapsProvider.h>
+#include <Swiften/Elements/CapsInfo.h>
+#include <Swiften/Client/DummyStanzaChannel.h>
+#include <Swiften/Disco/CapsInfoGenerator.h>
using namespace Swift;
@@ -52,7 +52,7 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReceiveKnownHash() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
sendPresenceWithCaps(user1, capsInfo1);
@@ -62,7 +62,7 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReceiveKnownHashTwiceDoesNotTriggerChange() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
sendPresenceWithCaps(user1, capsInfo1);
changes.clear();
@@ -73,14 +73,14 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReceiveUnknownHashDoesNotTriggerChange() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
sendPresenceWithCaps(user1, capsInfo1);
CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(changes.size()));
}
void testHashAvailable() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
sendPresenceWithCaps(user1, capsInfo1);
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
@@ -92,7 +92,7 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReceiveUnknownHashAfterKnownHashTriggersChangeAndClearsCaps() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
sendPresenceWithCaps(user1, capsInfo1);
changes.clear();
@@ -104,7 +104,7 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReceiveUnavailablePresenceAfterKnownHashTriggersChangeAndClearsCaps() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
sendPresenceWithCaps(user1, capsInfo1);
changes.clear();
@@ -116,7 +116,7 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
void testReconnectTriggersChangeAndClearsCaps() {
- std::auto_ptr<EntityCapsManager> testling = createManager();
+ boost::shared_ptr<EntityCapsManager> testling = createManager();
capsProvider->caps[capsInfo1->getVersion()] = discoInfo1;
capsProvider->caps[capsInfo2->getVersion()] = discoInfo2;
sendPresenceWithCaps(user1, capsInfo1);
@@ -133,8 +133,8 @@ class EntityCapsManagerTest : public CppUnit::TestFixture {
}
private:
- std::auto_ptr<EntityCapsManager> createManager() {
- std::auto_ptr<EntityCapsManager> manager(new EntityCapsManager(capsProvider, stanzaChannel));
+ boost::shared_ptr<EntityCapsManager> createManager() {
+ boost::shared_ptr<EntityCapsManager> manager(new EntityCapsManager(capsProvider, stanzaChannel));
manager->onCapsChanged.connect(boost::bind(&EntityCapsManagerTest::handleCapsChanged, this, _1));
return manager;
}