summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-02 18:17:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-02 18:24:14 (GMT)
commit81443e9863763187a4d6e40a5b7c75be6ad39809 (patch)
treec75225e9826b96d1d83c0702dbfa9b3bf1924a15 /Swiften/VCards
parent2d84b0e551a2661c03bdb96f575effb47b22d678 (diff)
downloadswift-contrib-81443e9863763187a4d6e40a5b7c75be6ad39809.zip
swift-contrib-81443e9863763187a4d6e40a5b7c75be6ad39809.tar.bz2
Replace auto_ptr by shared_ptr.
Diffstat (limited to 'Swiften/VCards')
-rw-r--r--Swiften/VCards/UnitTest/VCardManagerTest.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/VCards/UnitTest/VCardManagerTest.cpp b/Swiften/VCards/UnitTest/VCardManagerTest.cpp
index 687442b..bea93eb 100644
--- a/Swiften/VCards/UnitTest/VCardManagerTest.cpp
+++ b/Swiften/VCards/UnitTest/VCardManagerTest.cpp
@@ -48,7 +48,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testGet_NewVCardRequestsVCard() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
VCard::ref result = testling->getVCardAndRequestWhenNeeded(JID("foo@bar.com/baz"));
CPPUNIT_ASSERT(!result);
@@ -57,7 +57,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testGet_ExistingVCard() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
VCard::ref vcard(new VCard());
vcard->setFullName("Foo Bar");
vcardStorage->setVCard(JID("foo@bar.com/baz"), vcard);
@@ -69,7 +69,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequest_RequestsVCard() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(JID("foo@bar.com/baz"));
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size()));
@@ -77,7 +77,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequest_ReceiveEmitsNotification() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(JID("foo@bar.com/baz"));
stanzaChannel->onIQReceived(createVCardResult());
@@ -90,7 +90,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequest_Error() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(JID("foo@bar.com/baz"));
stanzaChannel->onIQReceived(IQ::createError(JID("baz@fum.com/foo"), stanzaChannel->sentStanzas[0]->getID()));
@@ -101,7 +101,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequest_VCardAlreadyRequested() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(JID("foo@bar.com/baz"));
VCard::ref result = testling->getVCardAndRequestWhenNeeded(JID("foo@bar.com/baz"));
@@ -110,7 +110,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequest_AfterPreviousRequest() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(JID("foo@bar.com/baz"));
stanzaChannel->onIQReceived(createVCardResult());
testling->requestVCard(JID("foo@bar.com/baz"));
@@ -120,7 +120,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testRequestOwnVCard() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
testling->requestVCard(ownJID);
stanzaChannel->onIQReceived(createOwnVCardResult());
@@ -136,7 +136,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testCreateSetVCardRequest() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
VCard::ref vcard = boost::make_shared<VCard>();
vcard->setFullName("New Name");
SetVCardRequest::ref request = testling->createSetVCardRequest(vcard);
@@ -150,7 +150,7 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
void testCreateSetVCardRequest_Error() {
- std::auto_ptr<VCardManager> testling = createManager();
+ boost::shared_ptr<VCardManager> testling = createManager();
VCard::ref vcard = boost::make_shared<VCard>();
vcard->setFullName("New Name");
SetVCardRequest::ref request = testling->createSetVCardRequest(vcard);
@@ -162,8 +162,8 @@ class VCardManagerTest : public CppUnit::TestFixture {
}
private:
- std::auto_ptr<VCardManager> createManager() {
- std::auto_ptr<VCardManager> manager(new VCardManager(ownJID, iqRouter, vcardStorage));
+ boost::shared_ptr<VCardManager> createManager() {
+ boost::shared_ptr<VCardManager> manager(new VCardManager(ownJID, iqRouter, vcardStorage));
manager->onVCardChanged.connect(boost::bind(&VCardManagerTest::handleVCardChanged, this, _1, _2));
manager->onOwnVCardChanged.connect(boost::bind(&VCardManagerTest::handleOwnVCardChanged, this, _1));
return manager;