summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Roster/UnitTest')
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp12
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp18
-rw-r--r--Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h10
3 files changed, 20 insertions, 20 deletions
diff --git a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
index cabf2bf..4ef1cc1 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterControllerTest.cpp
@@ -65,7 +65,7 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(0), xmppRoster_->getGroupsForJID(jid1_).size());
CPPUNIT_ASSERT(xmppRoster_->containsJID(jid1_));
- CPPUNIT_ASSERT_EQUAL(String("Bob"), xmppRoster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("Bob"), xmppRoster_->getNameForJID(jid1_));
}
void testModify() {
@@ -85,7 +85,7 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(Update, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("Bob2"), xmppRoster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("Bob2"), xmppRoster_->getNameForJID(jid1_));
}
void testRemove() {
@@ -135,7 +135,7 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture {
boost::shared_ptr<RosterPayload> payload4(new RosterPayload());
RosterItemPayload item(jid3_, "Jane", RosterItemPayload::Both);
- String janesGroup("Jane's Group");
+ std::string janesGroup("Jane's Group");
item.addGroup(janesGroup);
payload4->addItem(item);
channel_->onIQReceived(IQ::createRequest(IQ::Set, JID(), "id4", payload4));
@@ -156,14 +156,14 @@ class XMPPRosterControllerTest : public CppUnit::TestFixture {
boost::shared_ptr<RosterPayload> payload6(new RosterPayload());
RosterItemPayload item2(jid2_, "Little Alice", RosterItemPayload::Both);
- String alicesGroup("Alice's Group");
+ std::string alicesGroup("Alice's Group");
item2.addGroup(alicesGroup);
payload6->addItem(item2);
channel_->onIQReceived(IQ::createRequest(IQ::Set, JID(), "id6", payload6));
CPPUNIT_ASSERT_EQUAL(Update, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid2_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("Little Alice"), xmppRoster_->getNameForJID(jid2_));
- CPPUNIT_ASSERT_EQUAL(String("Jane"), xmppRoster_->getNameForJID(jid3_));
+ CPPUNIT_ASSERT_EQUAL(std::string("Little Alice"), xmppRoster_->getNameForJID(jid2_));
+ CPPUNIT_ASSERT_EQUAL(std::string("Jane"), xmppRoster_->getNameForJID(jid3_));
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), xmppRoster_->getGroupsForJID(jid2_).size());
CPPUNIT_ASSERT_EQUAL(alicesGroup, xmppRoster_->getGroupsForJID(jid2_)[0]);
CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(1), xmppRoster_->getGroupsForJID(jid3_).size());
diff --git a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
index 77993ea..edb8271 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
+++ b/Swiften/Roster/UnitTest/XMPPRosterImplTest.cpp
@@ -45,21 +45,21 @@ class XMPPRosterImplTest : public CppUnit::TestFixture {
roster_->addContact(jid1_, "NewName", groups1_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Add, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NewName"), roster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NewName"), roster_->getNameForJID(jid1_));
CPPUNIT_ASSERT(groups1_ == roster_->getGroupsForJID(jid1_));
handler_->reset();
roster_->addContact(jid2_, "NameTwo", groups1_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Add, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid2_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NameTwo"), roster_->getNameForJID(jid2_));
- CPPUNIT_ASSERT_EQUAL(String("NewName"), roster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NameTwo"), roster_->getNameForJID(jid2_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NewName"), roster_->getNameForJID(jid1_));
CPPUNIT_ASSERT(groups1_ == roster_->getGroupsForJID(jid2_));
CPPUNIT_ASSERT(groups1_ == roster_->getGroupsForJID(jid1_));
handler_->reset();
roster_->addContact(jid3_, "NewName", groups2_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Add, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid3_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NewName"), roster_->getNameForJID(jid3_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NewName"), roster_->getNameForJID(jid3_));
CPPUNIT_ASSERT(groups2_ == roster_->getGroupsForJID(jid3_));
}
@@ -73,7 +73,7 @@ class XMPPRosterImplTest : public CppUnit::TestFixture {
roster_->addContact(jid1_, "NewName2", groups1_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Add, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NewName2"), roster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NewName2"), roster_->getNameForJID(jid1_));
roster_->addContact(jid2_, "NewName3", groups1_, RosterItemPayload::Both);
handler_->reset();
roster_->removeContact(jid2_);
@@ -89,13 +89,13 @@ class XMPPRosterImplTest : public CppUnit::TestFixture {
roster_->addContact(jid1_, "NewName", groups1_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Add, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NewName"), roster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NewName"), roster_->getNameForJID(jid1_));
CPPUNIT_ASSERT(groups1_ == roster_->getGroupsForJID(jid1_));
handler_->reset();
roster_->addContact(jid1_, "NameTwo", groups2_, RosterItemPayload::Both);
CPPUNIT_ASSERT_EQUAL(Update, handler_->getLastEvent());
CPPUNIT_ASSERT_EQUAL(jid1_, handler_->getLastJID());
- CPPUNIT_ASSERT_EQUAL(String("NameTwo"), roster_->getNameForJID(jid1_));
+ CPPUNIT_ASSERT_EQUAL(std::string("NameTwo"), roster_->getNameForJID(jid1_));
CPPUNIT_ASSERT(groups2_ == roster_->getGroupsForJID(jid1_));
}
@@ -105,8 +105,8 @@ class XMPPRosterImplTest : public CppUnit::TestFixture {
JID jid1_;
JID jid2_;
JID jid3_;
- std::vector<String> groups1_;
- std::vector<String> groups2_;
+ std::vector<std::string> groups1_;
+ std::vector<std::string> groups2_;
};
CPPUNIT_TEST_SUITE_REGISTRATION(XMPPRosterImplTest);
diff --git a/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h b/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h
index 5e15e9f..1bbd8e9 100644
--- a/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h
+++ b/Swiften/Roster/UnitTest/XMPPRosterSignalHandler.h
@@ -34,11 +34,11 @@ public:
return lastJID_;
}
- String getLastOldName() {
+ std::string getLastOldName() {
return lastOldName_;
}
- std::vector<String> getLastOldGroups() {
+ std::vector<std::string> getLastOldGroups() {
return lastOldGroups_;
}
@@ -57,7 +57,7 @@ private:
lastEvent_ = Remove;
}
- void handleJIDUpdated(const JID& jid, const String& oldName, const std::vector<String>& oldGroups) {
+ void handleJIDUpdated(const JID& jid, const std::string& oldName, const std::vector<std::string>& oldGroups) {
CPPUNIT_ASSERT_EQUAL(None, lastEvent_);
lastJID_ = jid;
lastOldName_ = oldName;
@@ -67,7 +67,7 @@ private:
XMPPRosterEvents lastEvent_;
JID lastJID_;
- String lastOldName_;
- std::vector<String> lastOldGroups_;
+ std::string lastOldName_;
+ std::vector<std::string> lastOldGroups_;
};