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/FileTransfer/UnitTest
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/FileTransfer/UnitTest')
-rw-r--r--Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp10
-rw-r--r--Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp8
2 files changed, 9 insertions, 9 deletions
diff --git a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
index afd71c0..0cd273a 100644
--- a/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/IBBSendSessionTest.cpp
@@ -52,7 +52,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
IBB::ref ibb = stanzaChannel->sentStanzas[0]->getPayload<IBB>();
CPPUNIT_ASSERT_EQUAL(IBB::Open, ibb->getAction());
CPPUNIT_ASSERT_EQUAL(1234, ibb->getBlockSize());
- CPPUNIT_ASSERT_EQUAL(String("myid"), ibb->getStreamID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), ibb->getStreamID());
}
void testStart_ResponseStartsSending() {
@@ -68,7 +68,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(IBB::Data, ibb->getAction());
CPPUNIT_ASSERT_EQUAL(ByteArray("abc"), ibb->getData());
CPPUNIT_ASSERT_EQUAL(0, ibb->getSequenceNumber());
- CPPUNIT_ASSERT_EQUAL(String("myid"), ibb->getStreamID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), ibb->getStreamID());
}
void testResponseContinuesSending() {
@@ -84,7 +84,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT_EQUAL(IBB::Data, ibb->getAction());
CPPUNIT_ASSERT_EQUAL(ByteArray("def"), ibb->getData());
CPPUNIT_ASSERT_EQUAL(1, ibb->getSequenceNumber());
- CPPUNIT_ASSERT_EQUAL(String("myid"), ibb->getStreamID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), ibb->getStreamID());
}
void testRespondToAllFinishes() {
@@ -120,7 +120,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(stanzaChannel->isRequestAtIndex<IBB>(1, JID("foo@bar.com/baz"), IQ::Set));
IBB::ref ibb = stanzaChannel->sentStanzas[1]->getPayload<IBB>();
CPPUNIT_ASSERT_EQUAL(IBB::Close, ibb->getAction());
- CPPUNIT_ASSERT_EQUAL(String("myid"), ibb->getStreamID());
+ CPPUNIT_ASSERT_EQUAL(std::string("myid"), ibb->getStreamID());
CPPUNIT_ASSERT(finished);
CPPUNIT_ASSERT(!error);
}
@@ -144,7 +144,7 @@ class IBBSendSessionTest : public CppUnit::TestFixture {
}
private:
- std::auto_ptr<IBBSendSession> createSession(const String& to) {
+ std::auto_ptr<IBBSendSession> createSession(const std::string& to) {
std::auto_ptr<IBBSendSession> session(new IBBSendSession("myid", JID(to), bytestream, iqRouter));
session->onFinished.connect(boost::bind(&IBBSendSessionTest::handleFinished, this, _1));
return session;
diff --git a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
index b3b93ac..c6d246d 100644
--- a/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
+++ b/Swiften/FileTransfer/UnitTest/SOCKS5BytestreamServerSessionTest.cpp
@@ -123,12 +123,12 @@ class SOCKS5BytestreamServerSessionTest : public CppUnit::TestFixture {
receivedDataChunks = 0;
}
- void request(const String& hostname) {
- receive(ByteArray("\x05\x01\x00\x03", 4) + hostname.getUTF8Size() + hostname + ByteArray("\x00\x00", 2));
+ void request(const std::string& hostname) {
+ receive(ByteArray("\x05\x01\x00\x03", 4) + hostname.size() + hostname + ByteArray("\x00\x00", 2));
}
- void skipHeader(const String& hostname) {
- int headerSize = 7 + hostname.getUTF8Size();
+ void skipHeader(const std::string& hostname) {
+ int headerSize = 7 + hostname.size();
receivedData = ByteArray(receivedData.getData() + headerSize, receivedData.getSize() - headerSize);
}