summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Queries/UnitTest')
-rw-r--r--Swiften/Queries/UnitTest/RequestTest.cpp12
-rw-r--r--Swiften/Queries/UnitTest/ResponderTest.cpp8
2 files changed, 10 insertions, 10 deletions
diff --git a/Swiften/Queries/UnitTest/RequestTest.cpp b/Swiften/Queries/UnitTest/RequestTest.cpp
index 5013053..e99149e 100644
--- a/Swiften/Queries/UnitTest/RequestTest.cpp
+++ b/Swiften/Queries/UnitTest/RequestTest.cpp
@@ -30,8 +30,8 @@ class RequestTest : public CppUnit::TestFixture {
public:
class MyPayload : public Payload {
public:
- MyPayload(const String& s = "") : text_(s) {}
- String text_;
+ MyPayload(const std::string& s = "") : text_(s) {}
+ std::string text_;
};
typedef GenericRequest<MyPayload> MyRequest;
@@ -57,7 +57,7 @@ class RequestTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(channel_->iqs_.size()));
CPPUNIT_ASSERT_EQUAL(JID("foo@bar.com/baz"), channel_->iqs_[0]->getTo());
CPPUNIT_ASSERT_EQUAL(IQ::Set, channel_->iqs_[0]->getType());
- CPPUNIT_ASSERT_EQUAL(String("test-id"), channel_->iqs_[0]->getID());
+ CPPUNIT_ASSERT_EQUAL(std::string("test-id"), channel_->iqs_[0]->getID());
}
void testSendGet() {
@@ -140,19 +140,19 @@ class RequestTest : public CppUnit::TestFixture {
else {
boost::shared_ptr<MyPayload> payload(boost::dynamic_pointer_cast<MyPayload>(p));
CPPUNIT_ASSERT(payload);
- CPPUNIT_ASSERT_EQUAL(String("bar"), payload->text_);
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), payload->text_);
++responsesReceived_;
}
}
- boost::shared_ptr<IQ> createResponse(const String& id) {
+ boost::shared_ptr<IQ> createResponse(const std::string& id) {
boost::shared_ptr<IQ> iq(new IQ(IQ::Result));
iq->addPayload(responsePayload_);
iq->setID(id);
return iq;
}
- boost::shared_ptr<IQ> createError(const String& id) {
+ boost::shared_ptr<IQ> createError(const std::string& id) {
boost::shared_ptr<IQ> iq(new IQ(IQ::Error));
iq->setID(id);
return iq;
diff --git a/Swiften/Queries/UnitTest/ResponderTest.cpp b/Swiften/Queries/UnitTest/ResponderTest.cpp
index 97eb0c6..c087827 100644
--- a/Swiften/Queries/UnitTest/ResponderTest.cpp
+++ b/Swiften/Queries/UnitTest/ResponderTest.cpp
@@ -128,15 +128,15 @@ class ResponderTest : public CppUnit::TestFixture {
public:
MyResponder(IQRouter* router) : Responder<SoftwareVersion>(router), getRequestResponse_(true), setRequestResponse_(true) {}
- virtual bool handleGetRequest(const JID& from, const JID&, const String& id, boost::shared_ptr<SoftwareVersion> payload) {
+ virtual bool handleGetRequest(const JID& from, const JID&, const std::string& id, boost::shared_ptr<SoftwareVersion> payload) {
CPPUNIT_ASSERT_EQUAL(JID("foo@bar.com/baz"), from);
- CPPUNIT_ASSERT_EQUAL(String("myid"), id);
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), id);
getPayloads_.push_back(payload);
return getRequestResponse_;
}
- virtual bool handleSetRequest(const JID& from, const JID&, const String& id, boost::shared_ptr<SoftwareVersion> payload) {
+ virtual bool handleSetRequest(const JID& from, const JID&, const std::string& id, boost::shared_ptr<SoftwareVersion> payload) {
CPPUNIT_ASSERT_EQUAL(JID("foo@bar.com/baz"), from);
- CPPUNIT_ASSERT_EQUAL(String("myid"), id);
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), id);
setPayloads_.push_back(payload);
return setRequestResponse_;
}