diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-02-14 18:57:18 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-02-14 21:36:32 (GMT) |
commit | cb05f5a908e20006c954ce38755c2e422ecc2388 (patch) | |
tree | a793551a5fe279a57d4330119560e8542f745484 /Swiften/SASL/UnitTest | |
parent | cad974b45c0fb9355e68d9728e42c9ae3dbcebc7 (diff) | |
download | swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.zip swift-contrib-cb05f5a908e20006c954ce38755c2e422ecc2388.tar.bz2 |
Removed Swift::String.
Diffstat (limited to 'Swiften/SASL/UnitTest')
4 files changed, 23 insertions, 23 deletions
diff --git a/Swiften/SASL/UnitTest/DIGESTMD5ClientAuthenticatorTest.cpp b/Swiften/SASL/UnitTest/DIGESTMD5ClientAuthenticatorTest.cpp index 72c2b64..54f0571 100644 --- a/Swiften/SASL/UnitTest/DIGESTMD5ClientAuthenticatorTest.cpp +++ b/Swiften/SASL/UnitTest/DIGESTMD5ClientAuthenticatorTest.cpp @@ -38,7 +38,7 @@ class DIGESTMD5ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("charset=utf-8,cnonce=\"abcdefgh\",digest-uri=\"xmpp/xmpp.example.com\",nc=00000001,nonce=\"O6skKPuaCZEny3hteI19qXMBXSadoWs840MchORo\",qop=auth,realm=\"example.com\",response=088891c800ecff1b842159ad6459104a,username=\"user\""), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("charset=utf-8,cnonce=\"abcdefgh\",digest-uri=\"xmpp/xmpp.example.com\",nc=00000001,nonce=\"O6skKPuaCZEny3hteI19qXMBXSadoWs840MchORo\",qop=auth,realm=\"example.com\",response=088891c800ecff1b842159ad6459104a,username=\"user\""), response.toString()); } void testGetResponse_WithAuthorizationID() { @@ -52,7 +52,7 @@ class DIGESTMD5ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("authzid=\"myauthzid\",charset=utf-8,cnonce=\"abcdefgh\",digest-uri=\"xmpp/xmpp.example.com\",nc=00000001,nonce=\"O6skKPuaCZEny3hteI19qXMBXSadoWs840MchORo\",qop=auth,realm=\"example.com\",response=4293834432b6e7889a2dee7e8fe7dd06,username=\"user\""), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("authzid=\"myauthzid\",charset=utf-8,cnonce=\"abcdefgh\",digest-uri=\"xmpp/xmpp.example.com\",nc=00000001,nonce=\"O6skKPuaCZEny3hteI19qXMBXSadoWs840MchORo\",qop=auth,realm=\"example.com\",response=4293834432b6e7889a2dee7e8fe7dd06,username=\"user\""), response.toString()); } }; diff --git a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp index 1b2c121..152a41e 100644 --- a/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp +++ b/Swiften/SASL/UnitTest/DIGESTMD5PropertiesTest.cpp @@ -24,13 +24,13 @@ class DIGESTMD5PropertiesTest : public CppUnit::TestFixture { "algorithm=md5-sess,charset=utf-8")); CPPUNIT_ASSERT(properties.getValue("realm")); - CPPUNIT_ASSERT_EQUAL(String("myrealm1"), *properties.getValue("realm")); + CPPUNIT_ASSERT_EQUAL(std::string("myrealm1"), *properties.getValue("realm")); CPPUNIT_ASSERT(properties.getValue("nonce")); - CPPUNIT_ASSERT_EQUAL(String("mynonce"), *properties.getValue("nonce")); + CPPUNIT_ASSERT_EQUAL(std::string("mynonce"), *properties.getValue("nonce")); CPPUNIT_ASSERT(properties.getValue("algorithm")); - CPPUNIT_ASSERT_EQUAL(String("md5-sess"), *properties.getValue("algorithm")); + CPPUNIT_ASSERT_EQUAL(std::string("md5-sess"), *properties.getValue("algorithm")); CPPUNIT_ASSERT(properties.getValue("charset")); - CPPUNIT_ASSERT_EQUAL(String("utf-8"), *properties.getValue("charset")); + CPPUNIT_ASSERT_EQUAL(std::string("utf-8"), *properties.getValue("charset")); } void testSerialize() { diff --git a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp index 142d09e..d517f0d 100644 --- a/Swiften/SASL/UnitTest/PLAINMessageTest.cpp +++ b/Swiften/SASL/UnitTest/PLAINMessageTest.cpp @@ -40,29 +40,29 @@ class PLAINMessageTest : public CppUnit::TestFixture void testConstructor_WithoutAuthzID() { PLAINMessage message(ByteArray("\0user\0pass", 10)); - CPPUNIT_ASSERT_EQUAL(String(""), message.getAuthorizationID()); - CPPUNIT_ASSERT_EQUAL(String("user"), message.getAuthenticationID()); - CPPUNIT_ASSERT_EQUAL(String("pass"), message.getPassword()); + CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthorizationID()); + CPPUNIT_ASSERT_EQUAL(std::string("user"), message.getAuthenticationID()); + CPPUNIT_ASSERT_EQUAL(std::string("pass"), message.getPassword()); } void testConstructor_WithAuthzID() { PLAINMessage message(ByteArray("authz\0user\0pass", 15)); - CPPUNIT_ASSERT_EQUAL(String("authz"), message.getAuthorizationID()); - CPPUNIT_ASSERT_EQUAL(String("user"), message.getAuthenticationID()); - CPPUNIT_ASSERT_EQUAL(String("pass"), message.getPassword()); + CPPUNIT_ASSERT_EQUAL(std::string("authz"), message.getAuthorizationID()); + CPPUNIT_ASSERT_EQUAL(std::string("user"), message.getAuthenticationID()); + CPPUNIT_ASSERT_EQUAL(std::string("pass"), message.getPassword()); } void testConstructor_NoAuthcid() { PLAINMessage message(ByteArray("authzid", 7)); - CPPUNIT_ASSERT_EQUAL(String(""), message.getAuthenticationID()); + CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthenticationID()); } void testConstructor_NoPassword() { PLAINMessage message(ByteArray("authzid\0authcid", 15)); - CPPUNIT_ASSERT_EQUAL(String(""), message.getAuthenticationID()); + CPPUNIT_ASSERT_EQUAL(std::string(""), message.getAuthenticationID()); } }; diff --git a/Swiften/SASL/UnitTest/SCRAMSHA1ClientAuthenticatorTest.cpp b/Swiften/SASL/UnitTest/SCRAMSHA1ClientAuthenticatorTest.cpp index 0e42f38..5d0edbd 100644 --- a/Swiften/SASL/UnitTest/SCRAMSHA1ClientAuthenticatorTest.cpp +++ b/Swiften/SASL/UnitTest/SCRAMSHA1ClientAuthenticatorTest.cpp @@ -45,7 +45,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("n,,n=user,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("n,,n=user,r=abcdefghABCDEFGH"), response.toString()); } void testGetInitialResponse_UsernameHasSpecialChars() { @@ -54,7 +54,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("n,,n==2Cus=3D=2Cer=3D,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("n,,n==2Cus=3D=2Cer=3D,r=abcdefghABCDEFGH"), response.toString()); } void testGetInitialResponse_WithAuthorizationID() { @@ -63,7 +63,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("n,a=auth,n=user,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("n,a=auth,n=user,r=abcdefghABCDEFGH"), response.toString()); } void testGetInitialResponse_WithAuthorizationIDWithSpecialChars() { @@ -72,7 +72,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("n,a=a=3Du=2Cth,n=user,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("n,a=a=3Du=2Cth,n=user,r=abcdefghABCDEFGH"), response.toString()); } void testGetInitialResponse_WithoutChannelBindingWithTLSChannelBindingData() { @@ -82,7 +82,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("y,,n=user,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("y,,n=user,r=abcdefghABCDEFGH"), response.toString()); } void testGetInitialResponse_WithChannelBindingWithTLSChannelBindingData() { @@ -92,7 +92,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("p=tls-unique,,n=user,r=abcdefghABCDEFGH"), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("p=tls-unique,,n=user,r=abcdefghABCDEFGH"), response.toString()); } void testGetFinalResponse() { @@ -102,7 +102,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("c=biws,r=abcdefghABCDEFGH,p=CZbjGDpIteIJwQNBgO0P8pKkMGY="), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("c=biws,r=abcdefghABCDEFGH,p=CZbjGDpIteIJwQNBgO0P8pKkMGY="), response.toString()); } void testGetFinalResponse_WithoutChannelBindingWithTLSChannelBindingData() { @@ -113,7 +113,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("c=eSws,r=abcdefghABCDEFGH,p=JNpsiFEcxZvNZ1+FFBBqrYvYxMk="), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("c=eSws,r=abcdefghABCDEFGH,p=JNpsiFEcxZvNZ1+FFBBqrYvYxMk="), response.toString()); } void testGetFinalResponse_WithChannelBindingWithTLSChannelBindingData() { @@ -124,7 +124,7 @@ class SCRAMSHA1ClientAuthenticatorTest : public CppUnit::TestFixture { ByteArray response = *testling.getResponse(); - CPPUNIT_ASSERT_EQUAL(String("c=cD10bHMtdW5pcXVlLCx4eXph,r=abcdefghABCDEFGH,p=i6Rghite81P1ype8XxaVAa5l7v0="), response.toString()); + CPPUNIT_ASSERT_EQUAL(std::string("c=cD10bHMtdW5pcXVlLCx4eXph,r=abcdefghABCDEFGH,p=i6Rghite81P1ype8XxaVAa5l7v0="), response.toString()); } void testSetFinalChallenge() { |