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/LinkLocal/UnitTest
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/LinkLocal/UnitTest')
-rw-r--r--Swiften/LinkLocal/UnitTest/LinkLocalConnectorTest.cpp4
-rw-r--r--Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp10
-rw-r--r--Swiften/LinkLocal/UnitTest/LinkLocalServiceTest.cpp12
3 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/LinkLocal/UnitTest/LinkLocalConnectorTest.cpp b/Swiften/LinkLocal/UnitTest/LinkLocalConnectorTest.cpp
index 65b8a67..98deed1 100644
--- a/Swiften/LinkLocal/UnitTest/LinkLocalConnectorTest.cpp
+++ b/Swiften/LinkLocal/UnitTest/LinkLocalConnectorTest.cpp
@@ -51,7 +51,7 @@ class LinkLocalConnectorTest : public CppUnit::TestFixture {
CPPUNIT_ASSERT(connectFinished);
CPPUNIT_ASSERT(!connectError);
CPPUNIT_ASSERT(connection->connectedTo);
- CPPUNIT_ASSERT_EQUAL(String(connection->connectedTo->getAddress().toString()), String("192.168.1.1"));
+ CPPUNIT_ASSERT_EQUAL(std::string(connection->connectedTo->getAddress().toString()), std::string("192.168.1.1"));
CPPUNIT_ASSERT_EQUAL(connection->connectedTo->getPort(), 1234);
}
@@ -113,7 +113,7 @@ class LinkLocalConnectorTest : public CppUnit::TestFixture {
}
private:
- boost::shared_ptr<LinkLocalConnector> createConnector(const String& hostname, int port) {
+ boost::shared_ptr<LinkLocalConnector> createConnector(const std::string& hostname, int port) {
LinkLocalService service(
DNSSDServiceID("myname", "local."),
DNSSDResolveServiceQuery::Result(
diff --git a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp
index 1e0ee8a..3943e31 100644
--- a/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp
+++ b/Swiften/LinkLocal/UnitTest/LinkLocalServiceInfoTest.cpp
@@ -28,21 +28,21 @@ class LinkLocalServiceInfoTest : public CppUnit::TestFixture {
info.setLastName("Tron\xc3\xe7on");
info.setStatus(LinkLocalServiceInfo::Away);
- CPPUNIT_ASSERT_EQUAL(ByteArray("\x09txtvers=1\x09" + String("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")), info.toTXTRecord());
+ CPPUNIT_ASSERT_EQUAL(ByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")), info.toTXTRecord());
}
void testCreateFromTXTRecord() {
- LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(ByteArray("\x09txtvers=1\x09" + String("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")));
+ LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(ByteArray("\x09txtvers=1\x09" + std::string("1st=Remko\x0dlast=Tron\xc3\xe7on\x0bstatus=away")));
- CPPUNIT_ASSERT_EQUAL(String("Remko"), info.getFirstName());
- CPPUNIT_ASSERT_EQUAL(String("Tron\xc3\xe7on"), info.getLastName());
+ CPPUNIT_ASSERT_EQUAL(std::string("Remko"), info.getFirstName());
+ CPPUNIT_ASSERT_EQUAL(std::string("Tron\xc3\xe7on"), info.getLastName());
CPPUNIT_ASSERT_EQUAL(LinkLocalServiceInfo::Away, info.getStatus());
}
void testCreateFromTXTRecord_InvalidSize() {
LinkLocalServiceInfo info = LinkLocalServiceInfo::createFromTXTRecord(ByteArray("\x10last=a"));
- CPPUNIT_ASSERT_EQUAL(String("a"), info.getLastName());
+ CPPUNIT_ASSERT_EQUAL(std::string("a"), info.getLastName());
}
void testGetTXTRecordCreateFromTXTRecord_RoundTrip() {
diff --git a/Swiften/LinkLocal/UnitTest/LinkLocalServiceTest.cpp b/Swiften/LinkLocal/UnitTest/LinkLocalServiceTest.cpp
index 0d4de13..4835bde 100644
--- a/Swiften/LinkLocal/UnitTest/LinkLocalServiceTest.cpp
+++ b/Swiften/LinkLocal/UnitTest/LinkLocalServiceTest.cpp
@@ -24,35 +24,35 @@ class LinkLocalServiceTest : public CppUnit::TestFixture {
void testGetDescription_WithNick() {
LinkLocalService testling = createService("alice@wonderland", "Alice", "Alice In", "Wonderland");
- CPPUNIT_ASSERT_EQUAL(String("Alice"), testling.getDescription());
+ CPPUNIT_ASSERT_EQUAL(std::string("Alice"), testling.getDescription());
}
void testGetDescription_WithFirstName() {
LinkLocalService testling = createService("alice@wonderland", "", "Alice In");
- CPPUNIT_ASSERT_EQUAL(String("Alice In"), testling.getDescription());
+ CPPUNIT_ASSERT_EQUAL(std::string("Alice In"), testling.getDescription());
}
void testGetDescription_WithLastName() {
LinkLocalService testling = createService("alice@wonderland", "", "", "Wonderland");
- CPPUNIT_ASSERT_EQUAL(String("Wonderland"), testling.getDescription());
+ CPPUNIT_ASSERT_EQUAL(std::string("Wonderland"), testling.getDescription());
}
void testGetDescription_WithFirstAndLastName() {
LinkLocalService testling = createService("alice@wonderland", "", "Alice In", "Wonderland");
- CPPUNIT_ASSERT_EQUAL(String("Alice In Wonderland"), testling.getDescription());
+ CPPUNIT_ASSERT_EQUAL(std::string("Alice In Wonderland"), testling.getDescription());
}
void testGetDescription_NoInfo() {
LinkLocalService testling = createService("alice@wonderland");
- CPPUNIT_ASSERT_EQUAL(String("alice@wonderland"), testling.getDescription());
+ CPPUNIT_ASSERT_EQUAL(std::string("alice@wonderland"), testling.getDescription());
}
private:
- LinkLocalService createService(const String& name, const String& nickName = String(), const String& firstName = String(), const String& lastName = String()) {
+ LinkLocalService createService(const std::string& name, const std::string& nickName = std::string(), const std::string& firstName = std::string(), const std::string& lastName = std::string()) {
DNSSDServiceID service(name, "local.");
LinkLocalServiceInfo info;
info.setFirstName(firstName);