summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/UnitTest')
-rw-r--r--Swiften/Avatars/UnitTest/CombinedAvatarProviderTest.cpp18
-rw-r--r--Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp14
-rw-r--r--Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp8
3 files changed, 20 insertions, 20 deletions
diff --git a/Swiften/Avatars/UnitTest/CombinedAvatarProviderTest.cpp b/Swiften/Avatars/UnitTest/CombinedAvatarProviderTest.cpp
index ad3a0f1..6153d29 100644
--- a/Swiften/Avatars/UnitTest/CombinedAvatarProviderTest.cpp
+++ b/Swiften/Avatars/UnitTest/CombinedAvatarProviderTest.cpp
@@ -9,7 +9,7 @@
#include <boost/bind.hpp>
#include "Swiften/JID/JID.h"
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Avatars/CombinedAvatarProvider.h"
using namespace Swift;
@@ -47,7 +47,7 @@ class CombinedAvatarProviderTest : public CppUnit::TestFixture {
void testGetAvatarWithNoAvatarProviderReturnsEmpty() {
std::auto_ptr<CombinedAvatarProvider> testling(createProvider());
- CPPUNIT_ASSERT(testling->getAvatarHash(user1).isEmpty());
+ CPPUNIT_ASSERT(testling->getAvatarHash(user1).empty());
}
void testGetAvatarWithSingleAvatarProvider() {
@@ -168,26 +168,26 @@ class CombinedAvatarProviderTest : public CppUnit::TestFixture {
private:
struct DummyAvatarProvider : public AvatarProvider {
- String getAvatarHash(const JID& jid) const {
- std::map<JID, String>::const_iterator i = avatars.find(jid);
+ std::string getAvatarHash(const JID& jid) const {
+ std::map<JID, std::string>::const_iterator i = avatars.find(jid);
if (i != avatars.end()) {
return i->second;
}
else {
- return String();
+ return std::string();
}
}
- std::map<JID, String> avatars;
+ std::map<JID, std::string> avatars;
};
DummyAvatarProvider* avatarProvider1;
DummyAvatarProvider* avatarProvider2;
JID user1;
JID user2;
- String avatarHash1;
- String avatarHash2;
- String avatarHash3;
+ std::string avatarHash1;
+ std::string avatarHash2;
+ std::string avatarHash3;
std::vector<JID> changes;
};
diff --git a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp
index 8cb9ccb..be5eaea 100644
--- a/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp
+++ b/Swiften/Avatars/UnitTest/VCardAvatarManagerTest.cpp
@@ -62,7 +62,7 @@ class VCardAvatarManagerTest : public CppUnit::TestFixture {
storeVCardWithPhoto(user1.toBare(), avatar1);
avatarStorage->addAvatar(avatar1Hash, avatar1);
- String result = testling->getAvatarHash(user1);
+ std::string result = testling->getAvatarHash(user1);
CPPUNIT_ASSERT_EQUAL(avatar1Hash, result);
}
@@ -71,16 +71,16 @@ class VCardAvatarManagerTest : public CppUnit::TestFixture {
std::auto_ptr<VCardAvatarManager> testling = createManager();
storeEmptyVCard(user1.toBare());
- String result = testling->getAvatarHash(user1);
+ std::string result = testling->getAvatarHash(user1);
- CPPUNIT_ASSERT_EQUAL(String(), result);
+ CPPUNIT_ASSERT_EQUAL(std::string(), result);
}
void testGetAvatarHashUnknownAvatarKnownVCardStoresAvatar() {
std::auto_ptr<VCardAvatarManager> testling = createManager();
storeVCardWithPhoto(user1.toBare(), avatar1);
- String result = testling->getAvatarHash(user1);
+ std::string result = testling->getAvatarHash(user1);
CPPUNIT_ASSERT_EQUAL(avatar1Hash, result);
CPPUNIT_ASSERT(avatarStorage->hasAvatar(avatar1Hash));
@@ -90,9 +90,9 @@ class VCardAvatarManagerTest : public CppUnit::TestFixture {
void testGetAvatarHashUnknownAvatarUnknownVCard() {
std::auto_ptr<VCardAvatarManager> testling = createManager();
- String result = testling->getAvatarHash(user1);
+ std::string result = testling->getAvatarHash(user1);
- CPPUNIT_ASSERT_EQUAL(String(), result);
+ CPPUNIT_ASSERT_EQUAL(std::string(), result);
}
void testVCardUpdateTriggersUpdate() {
@@ -145,7 +145,7 @@ class VCardAvatarManagerTest : public CppUnit::TestFixture {
VCardManager* vcardManager;
VCardMemoryStorage* vcardStorage;
ByteArray avatar1;
- String avatar1Hash;
+ std::string avatar1Hash;
std::vector<JID> changes;
JID user1;
JID user2;
diff --git a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp
index a928ced..cde4a45 100644
--- a/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp
+++ b/Swiften/Avatars/UnitTest/VCardUpdateAvatarManagerTest.cpp
@@ -113,7 +113,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture {
stanzaChannel->onIQReceived(createVCardResult(ByteArray()));
CPPUNIT_ASSERT(!avatarStorage->hasAvatar(Hexify::hexify(SHA1::getHash(ByteArray()))));
- CPPUNIT_ASSERT_EQUAL(String(), testling->getAvatarHash(JID("foo@bar.com")));
+ CPPUNIT_ASSERT_EQUAL(std::string(), testling->getAvatarHash(JID("foo@bar.com")));
}
void testStanzaChannelReset_ClearsHash() {
@@ -128,7 +128,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(changes.size()));
CPPUNIT_ASSERT_EQUAL(user1.toBare(), changes[0]);
- CPPUNIT_ASSERT_EQUAL(String(""), testling->getAvatarHash(user1.toBare()));
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling->getAvatarHash(user1.toBare()));
}
void testStanzaChannelReset_ReceiveHashAfterResetUpdatesHash() {
@@ -154,7 +154,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture {
return result;
}
- boost::shared_ptr<Presence> createPresenceWithPhotoHash(const JID& jid, const String& hash) {
+ boost::shared_ptr<Presence> createPresenceWithPhotoHash(const JID& jid, const std::string& hash) {
boost::shared_ptr<Presence> presence(new Presence());
presence->setFrom(jid);
presence->addPayload(boost::shared_ptr<VCardUpdate>(new VCardUpdate(hash)));
@@ -187,7 +187,7 @@ class VCardUpdateAvatarManagerTest : public CppUnit::TestFixture {
VCardManager* vcardManager;
VCardMemoryStorage* vcardStorage;
ByteArray avatar1;
- String avatar1Hash;
+ std::string avatar1Hash;
std::vector<JID> changes;
JID user1;
JID user2;