diff options
Diffstat (limited to 'Swiften/Serializer/UnitTest')
4 files changed, 12 insertions, 8 deletions
diff --git a/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp index f044607..a81620d 100644 --- a/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp +++ b/Swiften/Serializer/UnitTest/AuthChallengeSerializerTest.cpp @@ -9,6 +9,7 @@ #include <Swiften/Serializer/AuthChallengeSerializer.h> #include <Swiften/Elements/AuthChallenge.h> +#include <Swiften/Base/ByteArray.h> using namespace Swift; @@ -23,7 +24,7 @@ class AuthChallengeSerializerTest : public CppUnit::TestFixture { void testSerialize() { AuthChallengeSerializer testling; boost::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge()); - authChallenge->setValue("foo"); + authChallenge->setValue(createByteArray("foo")); CPPUNIT_ASSERT_EQUAL(std::string( "<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" @@ -43,7 +44,7 @@ class AuthChallengeSerializerTest : public CppUnit::TestFixture { void testSerialize_EmptyMessage() { AuthChallengeSerializer testling; boost::shared_ptr<AuthChallenge> authChallenge(new AuthChallenge()); - authChallenge->setValue(ByteArray()); + authChallenge->setValue(std::vector<unsigned char>()); CPPUNIT_ASSERT_EQUAL(std::string( "<challenge xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" diff --git a/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp index eff2c8e..8270139 100644 --- a/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp +++ b/Swiften/Serializer/UnitTest/AuthRequestSerializerTest.cpp @@ -9,6 +9,7 @@ #include <Swiften/Serializer/AuthRequestSerializer.h> #include <Swiften/Elements/AuthRequest.h> +#include <Swiften/Base/ByteArray.h> using namespace Swift; @@ -23,7 +24,7 @@ class AuthRequestSerializerTest : public CppUnit::TestFixture { void testSerialize() { AuthRequestSerializer testling; boost::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN")); - authRequest->setMessage("foo"); + authRequest->setMessage(createByteArray("foo")); CPPUNIT_ASSERT_EQUAL(std::string( "<auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"PLAIN\">" @@ -43,7 +44,7 @@ class AuthRequestSerializerTest : public CppUnit::TestFixture { void testSerialize_EmptyMessage() { AuthRequestSerializer testling; boost::shared_ptr<AuthRequest> authRequest(new AuthRequest("PLAIN")); - authRequest->setMessage(ByteArray()); + authRequest->setMessage(std::vector<unsigned char>()); CPPUNIT_ASSERT_EQUAL(std::string( "<auth xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\" mechanism=\"PLAIN\">" diff --git a/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp index f14d184..e790cc3 100644 --- a/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp +++ b/Swiften/Serializer/UnitTest/AuthResponseSerializerTest.cpp @@ -9,6 +9,7 @@ #include <Swiften/Serializer/AuthResponseSerializer.h> #include <Swiften/Elements/AuthResponse.h> +#include <Swiften/Base/ByteArray.h> using namespace Swift; @@ -23,7 +24,7 @@ class AuthResponseSerializerTest : public CppUnit::TestFixture { void testSerialize() { AuthResponseSerializer testling; boost::shared_ptr<AuthResponse> authResponse(new AuthResponse()); - authResponse->setValue("foo"); + authResponse->setValue(createByteArray("foo")); CPPUNIT_ASSERT_EQUAL(std::string( "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" @@ -43,7 +44,7 @@ class AuthResponseSerializerTest : public CppUnit::TestFixture { void testSerialize_EmptyMessage() { AuthResponseSerializer testling; boost::shared_ptr<AuthResponse> authResponse(new AuthResponse()); - authResponse->setValue(ByteArray()); + authResponse->setValue(std::vector<unsigned char>()); CPPUNIT_ASSERT_EQUAL(std::string( "<response xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" diff --git a/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp b/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp index 0f6987c..a9f6de2 100644 --- a/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp +++ b/Swiften/Serializer/UnitTest/AuthSuccessSerializerTest.cpp @@ -9,6 +9,7 @@ #include <Swiften/Serializer/AuthSuccessSerializer.h> #include <Swiften/Elements/AuthSuccess.h> +#include <Swiften/Base/ByteArray.h> using namespace Swift; @@ -23,7 +24,7 @@ class AuthSuccessSerializerTest : public CppUnit::TestFixture { void testSerialize() { AuthSuccessSerializer testling; boost::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess()); - authSuccess->setValue("foo"); + authSuccess->setValue(createByteArray("foo")); CPPUNIT_ASSERT_EQUAL(std::string( "<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" @@ -43,7 +44,7 @@ class AuthSuccessSerializerTest : public CppUnit::TestFixture { void testSerialize_EmptyMessage() { AuthSuccessSerializer testling; boost::shared_ptr<AuthSuccess> authSuccess(new AuthSuccess()); - authSuccess->setValue(ByteArray()); + authSuccess->setValue(std::vector<unsigned char>()); CPPUNIT_ASSERT_EQUAL(std::string( "<success xmlns=\"urn:ietf:params:xml:ns:xmpp-sasl\">" |