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/JID/UnitTest
parentcad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff)
downloadswift-cb05f5a908e20006c954ce38755c2e422ecc2388.zip
swift-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2
Removed Swift::String.
Diffstat (limited to 'Swiften/JID/UnitTest')
-rw-r--r--Swiften/JID/UnitTest/JIDTest.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/Swiften/JID/UnitTest/JIDTest.cpp b/Swiften/JID/UnitTest/JIDTest.cpp
index 51e6d2c..0f22e15 100644
--- a/Swiften/JID/UnitTest/JIDTest.cpp
+++ b/Swiften/JID/UnitTest/JIDTest.cpp
@@ -59,18 +59,18 @@ class JIDTest : public CppUnit::TestFixture
void testConstructorWithString() {
JID testling("foo@bar/baz");
- CPPUNIT_ASSERT_EQUAL(String("foo"), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
- CPPUNIT_ASSERT_EQUAL(String("baz"), testling.getResource());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("baz"), testling.getResource());
CPPUNIT_ASSERT(!testling.isBare());
}
void testConstructorWithString_NoResource() {
JID testling("foo@bar");
- CPPUNIT_ASSERT_EQUAL(String("foo"), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
- CPPUNIT_ASSERT_EQUAL(String(""), testling.getResource());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.getResource());
CPPUNIT_ASSERT(testling.isBare());
}
@@ -84,38 +84,38 @@ class JIDTest : public CppUnit::TestFixture
void testConstructorWithString_NoNode() {
JID testling("bar/baz");
- CPPUNIT_ASSERT_EQUAL(String(""), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
- CPPUNIT_ASSERT_EQUAL(String("baz"), testling.getResource());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("baz"), testling.getResource());
CPPUNIT_ASSERT(!testling.isBare());
}
void testConstructorWithString_OnlyDomain() {
JID testling("bar");
- CPPUNIT_ASSERT_EQUAL(String(""), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
- CPPUNIT_ASSERT_EQUAL(String(""), testling.getResource());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.getResource());
CPPUNIT_ASSERT(testling.isBare());
}
void testConstructorWithString_UpperCaseNode() {
JID testling("Fo\xCE\xA9@bar");
- CPPUNIT_ASSERT_EQUAL(String("fo\xCF\x89"), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("fo\xCF\x89"), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
}
void testConstructorWithString_UpperCaseDomain() {
JID testling("Fo\xCE\xA9");
- CPPUNIT_ASSERT_EQUAL(String("fo\xCF\x89"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("fo\xCF\x89"), testling.getDomain());
}
void testConstructorWithString_UpperCaseResource() {
JID testling("bar/Fo\xCE\xA9");
- CPPUNIT_ASSERT_EQUAL(testling.getResource(), String("Fo\xCE\xA9"));
+ CPPUNIT_ASSERT_EQUAL(testling.getResource(), std::string("Fo\xCE\xA9"));
}
void testConstructorWithString_EmptyNode() {
@@ -127,9 +127,9 @@ class JIDTest : public CppUnit::TestFixture
void testConstructorWithStrings() {
JID testling("foo", "bar", "baz");
- CPPUNIT_ASSERT_EQUAL(String("foo"), testling.getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.getDomain());
- CPPUNIT_ASSERT_EQUAL(String("baz"), testling.getResource());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), testling.getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("baz"), testling.getResource());
}
void testIsBare() {
@@ -143,49 +143,49 @@ class JIDTest : public CppUnit::TestFixture
void testToBare() {
JID testling("foo@bar/baz");
- CPPUNIT_ASSERT_EQUAL(String("foo"), testling.toBare().getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.toBare().getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo"), testling.toBare().getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.toBare().getDomain());
CPPUNIT_ASSERT(testling.toBare().isBare());
}
void testToBare_EmptyNode() {
JID testling("bar/baz");
- CPPUNIT_ASSERT_EQUAL(String(""), testling.toBare().getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.toBare().getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.toBare().getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.toBare().getDomain());
CPPUNIT_ASSERT(testling.toBare().isBare());
}
void testToBare_EmptyResource() {
JID testling("bar/");
- CPPUNIT_ASSERT_EQUAL(String(""), testling.toBare().getNode());
- CPPUNIT_ASSERT_EQUAL(String("bar"), testling.toBare().getDomain());
+ CPPUNIT_ASSERT_EQUAL(std::string(""), testling.toBare().getNode());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar"), testling.toBare().getDomain());
CPPUNIT_ASSERT(testling.toBare().isBare());
}
void testToString() {
JID testling("foo@bar/baz");
- CPPUNIT_ASSERT_EQUAL(String("foo@bar/baz"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo@bar/baz"), testling.toString());
}
void testToString_EmptyNode() {
JID testling("bar/baz");
- CPPUNIT_ASSERT_EQUAL(String("bar/baz"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("bar/baz"), testling.toString());
}
void testToString_NoResource() {
JID testling("foo@bar");
- CPPUNIT_ASSERT_EQUAL(String("foo@bar"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo@bar"), testling.toString());
}
void testToString_EmptyResource() {
JID testling("foo@bar/");
- CPPUNIT_ASSERT_EQUAL(String("foo@bar/"), testling.toString());
+ CPPUNIT_ASSERT_EQUAL(std::string("foo@bar/"), testling.toString());
}
void testCompare_SmallerNode() {