diff options
Diffstat (limited to 'Swiften/QA/StorageTest')
-rw-r--r-- | Swiften/QA/StorageTest/FileReadBytestreamTest.cpp | 4 | ||||
-rw-r--r-- | Swiften/QA/StorageTest/VCardFileStorageTest.cpp | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Swiften/QA/StorageTest/FileReadBytestreamTest.cpp b/Swiften/QA/StorageTest/FileReadBytestreamTest.cpp index b8e9fd4..925c775 100644 --- a/Swiften/QA/StorageTest/FileReadBytestreamTest.cpp +++ b/Swiften/QA/StorageTest/FileReadBytestreamTest.cpp @@ -34,7 +34,7 @@ class FileReadBytestreamTest : public CppUnit::TestFixture { ByteArray result = testling->read(10); - CPPUNIT_ASSERT_EQUAL(String("/*\n * Copy"), result.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("/*\n * Copy"), result.toString()); } void testRead_Twice() { @@ -43,7 +43,7 @@ class FileReadBytestreamTest : public CppUnit::TestFixture { testling->read(10); ByteArray result = testling->read(10); - CPPUNIT_ASSERT_EQUAL(String("right (c) "), result.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("right (c) "), result.toString()); } void testIsFinished_NotFinished() { diff --git a/Swiften/QA/StorageTest/VCardFileStorageTest.cpp b/Swiften/QA/StorageTest/VCardFileStorageTest.cpp index 7ef1fd5..992ee50 100644 --- a/Swiften/QA/StorageTest/VCardFileStorageTest.cpp +++ b/Swiften/QA/StorageTest/VCardFileStorageTest.cpp @@ -6,6 +6,7 @@ #include <cppunit/extensions/HelperMacros.h> #include <cppunit/extensions/TestFactoryRegistry.h> +#include <boost/algorithm/string.hpp> #include "Swiften/VCards/VCardFileStorage.h" #include "Swiften/JID/JID.h" @@ -44,7 +45,7 @@ class VCardFileStorageTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(boost::filesystem::exists(vcardFile)); ByteArray data; data.readFromFile(vcardFile.string()); - CPPUNIT_ASSERT(data.toString().beginsWith("<vCard xmlns=\"vcard-temp\">")); + CPPUNIT_ASSERT(boost::starts_with(data.toString(), "<vCard xmlns=\"vcard-temp\">")); } void testGetVCard() { @@ -54,7 +55,7 @@ class VCardFileStorageTest : public CppUnit::TestFixture { testling->setVCard(JID("alice@wonderland.lit"), vcard); VCard::ref result = testling->getVCard(JID("alice@wonderland.lit")); - CPPUNIT_ASSERT_EQUAL(String("Alice In Wonderland"), result->getFullName()); + CPPUNIT_ASSERT_EQUAL(std::string("Alice In Wonderland"), result->getFullName()); } void testGetVCard_FileDoesNotExist() { |