summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-02-14 18:57:18 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-02-14 21:36:32 (GMT)
commitcb05f5a908e20006c954ce38755c2e422ecc2388 (patch)
treea793551a5fe279a57d4330119560e8542f745484 /Swiften/Queries/UnitTest
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
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_;
}