diff options
Diffstat (limited to 'Swiften/Presence/UnitTest')
-rw-r--r-- | Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp | 14 | ||||
-rw-r--r-- | Swiften/Presence/UnitTest/PresenceOracleTest.cpp | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp index 3a6487a..132c865 100644 --- a/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp +++ b/Swiften/Presence/UnitTest/PayloadAddingPresenceSenderTest.cpp @@ -44,7 +44,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture { testling->sendPresence(Presence::create("bar")); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size())); - CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus()); + CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus()); CPPUNIT_ASSERT(stanzaChannel->getStanzaAtIndex<Presence>(0)->getPayload<MyPayload>()); } @@ -55,7 +55,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture { testling->sendPresence(Presence::create("bar")); CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(stanzaChannel->sentStanzas.size())); - CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus()); + CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(0)->getStatus()); CPPUNIT_ASSERT(!stanzaChannel->getStanzaAtIndex<Presence>(0)->getPayload<MyPayload>()); } @@ -76,7 +76,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture { testling->setPayload(MyPayload::create("foo")); CPPUNIT_ASSERT_EQUAL(2, static_cast<int>(stanzaChannel->sentStanzas.size())); - CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(1)->getStatus()); + CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(1)->getStatus()); CPPUNIT_ASSERT(stanzaChannel->getStanzaAtIndex<Presence>(1)->getPayload<MyPayload>()); } @@ -102,7 +102,7 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture { testling->setPayload(MyPayload::create("foo")); CPPUNIT_ASSERT_EQUAL(3, static_cast<int>(stanzaChannel->sentStanzas.size())); - CPPUNIT_ASSERT_EQUAL(String("bar"), stanzaChannel->getStanzaAtIndex<Presence>(2)->getStatus()); + CPPUNIT_ASSERT_EQUAL(std::string("bar"), stanzaChannel->getStanzaAtIndex<Presence>(2)->getStatus()); } private: @@ -114,13 +114,13 @@ class PayloadAddingPresenceSenderTest : public CppUnit::TestFixture { struct MyPayload : public Payload { typedef boost::shared_ptr<MyPayload> ref; - MyPayload(const String& body) : body(body) {} + MyPayload(const std::string& body) : body(body) {} - static ref create(const String& body) { + static ref create(const std::string& body) { return ref(new MyPayload(body)); } - String body; + std::string body; }; private: diff --git a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp index aa450a2..24cc62c 100644 --- a/Swiften/Presence/UnitTest/PresenceOracleTest.cpp +++ b/Swiften/Presence/UnitTest/PresenceOracleTest.cpp @@ -122,7 +122,7 @@ class PresenceOracleTest : public CppUnit::TestFixture { } void testSubscriptionRequest() { - String reasonText = "Because I want to"; + std::string reasonText = "Because I want to"; JID sentJID = JID("me@example.com"); boost::shared_ptr<Presence> sentPresence(new Presence()); @@ -147,14 +147,14 @@ class PresenceOracleTest : public CppUnit::TestFixture { } private: - Presence::ref makeOnline(const String& resource, int priority) { + Presence::ref makeOnline(const std::string& resource, int priority) { Presence::ref presence(new Presence()); presence->setPriority(priority); presence->setFrom(JID("alice@wonderland.lit/" + resource)); return presence; } - Presence::ref makeOffline(const String& resource) { + Presence::ref makeOffline(const std::string& resource) { Presence::ref presence(new Presence()); presence->setFrom(JID("alice@wonderland.lit" + resource)); presence->setType(Presence::Unavailable); @@ -165,7 +165,7 @@ class PresenceOracleTest : public CppUnit::TestFixture { changes.push_back(newPresence); } - void handlePresenceSubscriptionRequest(const JID& jid, const String& reason) { + void handlePresenceSubscriptionRequest(const JID& jid, const std::string& reason) { SubscriptionRequestInfo subscriptionRequest; subscriptionRequest.jid = jid; subscriptionRequest.reason = reason; @@ -181,7 +181,7 @@ class PresenceOracleTest : public CppUnit::TestFixture { private: struct SubscriptionRequestInfo { JID jid; - String reason; + std::string reason; }; PresenceOracle* oracle_; SubscriptionManager* subscriptionManager_; |