diff options
Diffstat (limited to 'Swiften/Disco/UnitTest')
-rw-r--r-- | Swiften/Disco/UnitTest/CapsInfoGeneratorTest.cpp | 4 | ||||
-rw-r--r-- | Swiften/Disco/UnitTest/CapsManagerTest.cpp | 52 | ||||
-rw-r--r-- | Swiften/Disco/UnitTest/DiscoInfoResponderTest.cpp | 6 | ||||
-rw-r--r-- | Swiften/Disco/UnitTest/EntityCapsManagerTest.cpp | 28 | ||||
-rw-r--r-- | Swiften/Disco/UnitTest/JIDDiscoInfoResponderTest.cpp | 6 |
5 files changed, 48 insertions, 48 deletions
diff --git a/Swiften/Disco/UnitTest/CapsInfoGeneratorTest.cpp b/Swiften/Disco/UnitTest/CapsInfoGeneratorTest.cpp index d4cb331..52fdbaa 100644 --- a/Swiften/Disco/UnitTest/CapsInfoGeneratorTest.cpp +++ b/Swiften/Disco/UnitTest/CapsInfoGeneratorTest.cpp @@ -7,8 +7,8 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> -#include "Swiften/Elements/DiscoInfo.h" -#include "Swiften/Disco/CapsInfoGenerator.h" +#include <Swiften/Elements/DiscoInfo.h> +#include <Swiften/Disco/CapsInfoGenerator.h> using namespace Swift; diff --git a/Swiften/Disco/UnitTest/CapsManagerTest.cpp b/Swiften/Disco/UnitTest/CapsManagerTest.cpp index 793fdba..0681569 100644 --- a/Swiften/Disco/UnitTest/CapsManagerTest.cpp +++ b/Swiften/Disco/UnitTest/CapsManagerTest.cpp @@ -9,13 +9,13 @@ #include <vector> #include <boost/bind.hpp> -#include "Swiften/Disco/CapsManager.h" -#include "Swiften/Disco/CapsMemoryStorage.h" -#include "Swiften/Disco/CapsInfoGenerator.h" -#include "Swiften/Queries/IQRouter.h" -#include "Swiften/Elements/CapsInfo.h" -#include "Swiften/Elements/DiscoInfo.h" -#include "Swiften/Client/DummyStanzaChannel.h" +#include <Swiften/Disco/CapsManager.h> +#include <Swiften/Disco/CapsMemoryStorage.h> +#include <Swiften/Disco/CapsInfoGenerator.h> +#include <Swiften/Queries/IQRouter.h> +#include <Swiften/Elements/CapsInfo.h> +#include <Swiften/Elements/DiscoInfo.h> +#include <Swiften/Client/DummyStanzaChannel.h> using namespace Swift; @@ -64,7 +64,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveNewHashRequestsDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); CPPUNIT_ASSERT(stanzaChannel->isRequestAtIndex<DiscoInfo>(0, user1, IQ::Get)); @@ -74,7 +74,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->sentStanzas.clear(); sendPresenceWithCaps(user1, capsInfo1); @@ -83,14 +83,14 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveLegacyCapsDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, legacyCapsInfo); CPPUNIT_ASSERT_EQUAL(0, static_cast<int>(stanzaChannel->sentStanzas.size())); } void testReceiveSameHashAfterSuccesfulDiscoDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendDiscoInfoResult(discoInfo1); @@ -101,7 +101,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashFromSameUserAfterFailedDiscoDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID())); @@ -112,7 +112,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashFromSameUserAfterIncorrectVerificationDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendDiscoInfoResult(discoInfo2); @@ -123,7 +123,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashFromDifferentUserAfterFailedDiscoRequestsDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID())); @@ -133,7 +133,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashFromDifferentUserAfterIncorrectVerificationRequestsDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendDiscoInfoResult(discoInfo2); @@ -143,7 +143,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveDifferentHashFromSameUserAfterFailedDiscoDoesNotRequestDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID())); @@ -154,7 +154,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSuccesfulDiscoStoresCaps() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendDiscoInfoResult(discoInfo1); @@ -164,7 +164,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveIncorrectVerificationDiscoDoesNotStoreCaps() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendDiscoInfoResult(discoInfo2); @@ -173,7 +173,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveFailingDiscoFallsBack() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendPresenceWithCaps(user2, capsInfo1alt); stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID())); @@ -185,7 +185,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveNoDiscoFallsBack() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendPresenceWithCaps(user2, capsInfo1alt); stanzaChannel->onIQReceived(IQ::createResult(JID("baz@fum.com/dum"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID(), boost::shared_ptr<DiscoInfo>())); @@ -197,7 +197,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveFailingFallbackDiscoFallsBack() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendPresenceWithCaps(user2, capsInfo1alt); sendPresenceWithCaps(user3, capsInfo1); @@ -208,7 +208,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReceiveSameHashFromFailingUserAfterReconnectRequestsDisco() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getTo(), stanzaChannel->sentStanzas[0]->getID())); stanzaChannel->setAvailable(false); @@ -221,7 +221,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReconnectResetsFallback() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); sendPresenceWithCaps(user2, capsInfo1alt); stanzaChannel->setAvailable(false); @@ -234,7 +234,7 @@ class CapsManagerTest : public CppUnit::TestFixture { } void testReconnectResetsRequests() { - std::auto_ptr<CapsManager> testling = createManager(); + boost::shared_ptr<CapsManager> testling = createManager(); sendPresenceWithCaps(user1, capsInfo1); stanzaChannel->sentStanzas.clear(); stanzaChannel->setAvailable(false); @@ -245,8 +245,8 @@ class CapsManagerTest : public CppUnit::TestFixture { } private: - std::auto_ptr<CapsManager> createManager() { - std::auto_ptr<CapsManager> manager(new CapsManager(storage, stanzaChannel, iqRouter)); + boost::shared_ptr<CapsManager> createManager() { + boost::shared_ptr<CapsManager> manager(new CapsManager(storage, stanzaChannel, iqRouter)); manager->setWarnOnInvalidHash(false); //manager->onCapsChanged.connect(boost::bind(&CapsManagerTest::handleCapsChanged, this, _1)); return manager; diff --git a/Swiften/Disco/UnitTest/DiscoInfoResponderTest.cpp b/Swiften/Disco/UnitTest/DiscoInfoResponderTest.cpp index bccf0d4..1477e23 100644 --- a/Swiften/Disco/UnitTest/DiscoInfoResponderTest.cpp +++ b/Swiften/Disco/UnitTest/DiscoInfoResponderTest.cpp @@ -8,9 +8,9 @@ #include <cppunit/extensions/TestFactoryRegistry.h> #include <typeinfo> -#include "Swiften/Disco/DiscoInfoResponder.h" -#include "Swiften/Queries/IQRouter.h" -#include "Swiften/Queries/DummyIQChannel.h" +#include <Swiften/Disco/DiscoInfoResponder.h> +#include <Swiften/Queries/IQRouter.h> +#include <Swiften/Queries/DummyIQChannel.h> using namespace Swift; 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; } diff --git a/Swiften/Disco/UnitTest/JIDDiscoInfoResponderTest.cpp b/Swiften/Disco/UnitTest/JIDDiscoInfoResponderTest.cpp index ef61afa..7e2e3dd 100644 --- a/Swiften/Disco/UnitTest/JIDDiscoInfoResponderTest.cpp +++ b/Swiften/Disco/UnitTest/JIDDiscoInfoResponderTest.cpp @@ -8,9 +8,9 @@ #include <cppunit/extensions/TestFactoryRegistry.h> #include <typeinfo> -#include "Swiften/Disco/JIDDiscoInfoResponder.h" -#include "Swiften/Queries/IQRouter.h" -#include "Swiften/Queries/DummyIQChannel.h" +#include <Swiften/Disco/JIDDiscoInfoResponder.h> +#include <Swiften/Queries/IQRouter.h> +#include <Swiften/Queries/DummyIQChannel.h> using namespace Swift; |