diff options
Diffstat (limited to 'Swiften/Parser/UnitTest')
4 files changed, 13 insertions, 13 deletions
diff --git a/Swiften/Parser/UnitTest/StanzaParserTest.cpp b/Swiften/Parser/UnitTest/StanzaParserTest.cpp index c081b1b..6febdbc 100644 --- a/Swiften/Parser/UnitTest/StanzaParserTest.cpp +++ b/Swiften/Parser/UnitTest/StanzaParserTest.cpp @@ -193,15 +193,15 @@ class StanzaParserTest : public CppUnit::TestFixture { public: MyStanzaParser(PayloadParserFactoryCollection* collection) : StanzaParser(collection) { - stanza_ = boost::make_shared<MyStanza>(); + stanza_ = std::make_shared<MyStanza>(); } - virtual boost::shared_ptr<ToplevelElement> getElement() const { + virtual std::shared_ptr<ToplevelElement> getElement() const { return stanza_; } private: - boost::shared_ptr<MyStanza> stanza_; + std::shared_ptr<MyStanza> stanza_; }; MyPayload1ParserFactory factory1_; diff --git a/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp b/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp index 031f2f3..4664df2 100644 --- a/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp +++ b/Swiften/Parser/UnitTest/StreamFeaturesParserTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010-2015 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -42,7 +42,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture { "<ver xmlns=\"urn:xmpp:features:rosterver\"/>" "</stream:features>")); - StreamFeatures::ref element = boost::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); + StreamFeatures::ref element = std::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); CPPUNIT_ASSERT(element->hasStartTLS()); CPPUNIT_ASSERT(element->hasSession()); CPPUNIT_ASSERT(element->hasResourceBind()); @@ -62,7 +62,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(parser.parse("<stream:features xmlns:stream='http://etherx.jabber.org/streams'/>")); - StreamFeatures::ref element = boost::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); + StreamFeatures::ref element = std::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); CPPUNIT_ASSERT(!element->hasStartTLS()); CPPUNIT_ASSERT(!element->hasSession()); CPPUNIT_ASSERT(!element->hasResourceBind()); @@ -82,7 +82,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture { "</mechanisms>" "</stream:features>")); - StreamFeatures::ref element = boost::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); + StreamFeatures::ref element = std::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); CPPUNIT_ASSERT(element->hasAuthenticationMechanism("GSSAPI")); CPPUNIT_ASSERT_EQUAL(*element->getAuthenticationHostname(), hostname); } @@ -99,7 +99,7 @@ class StreamFeaturesParserTest : public CppUnit::TestFixture { "</mechanisms>" "</stream:features>")); - StreamFeatures::ref element = boost::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); + StreamFeatures::ref element = std::dynamic_pointer_cast<StreamFeatures>(testling.getElement()); CPPUNIT_ASSERT(element->hasAuthenticationMechanism("GSSAPI")); CPPUNIT_ASSERT(element->getAuthenticationHostname()->empty()); } diff --git a/Swiften/Parser/UnitTest/StreamManagementEnabledParserTest.cpp b/Swiften/Parser/UnitTest/StreamManagementEnabledParserTest.cpp index 7b4a9cc..704a89f 100644 --- a/Swiften/Parser/UnitTest/StreamManagementEnabledParserTest.cpp +++ b/Swiften/Parser/UnitTest/StreamManagementEnabledParserTest.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2010 Isode Limited. + * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -25,7 +25,7 @@ class StreamManagementEnabledParserTest : public CppUnit::TestFixture { CPPUNIT_ASSERT(parser.parse( "<enabled xmlns=\"urn:xmpp:sm:3\" id=\"some-long-sm-id\" resume=\"true\"/>")); - boost::shared_ptr<StreamManagementEnabled> element = boost::dynamic_pointer_cast<StreamManagementEnabled>(testling.getElement()); + std::shared_ptr<StreamManagementEnabled> element = std::dynamic_pointer_cast<StreamManagementEnabled>(testling.getElement()); CPPUNIT_ASSERT(element->getResumeSupported()); CPPUNIT_ASSERT_EQUAL(std::string("some-long-sm-id"), element->getResumeID()); } diff --git a/Swiften/Parser/UnitTest/XMPPParserTest.cpp b/Swiften/Parser/UnitTest/XMPPParserTest.cpp index a4cb7b8..2424d4d 100644 --- a/Swiften/Parser/UnitTest/XMPPParserTest.cpp +++ b/Swiften/Parser/UnitTest/XMPPParserTest.cpp @@ -163,7 +163,7 @@ class XMPPParserTest : public CppUnit::TestFixture { public: enum Type { StreamStart, ElementEvent, StreamEnd }; struct Event { - Event(Type type, boost::shared_ptr<ToplevelElement> element) + Event(Type type, std::shared_ptr<ToplevelElement> element) : type(type), element(element) {} Event(Type type, const ProtocolHeader& header) : type(type), header(header) {} @@ -171,7 +171,7 @@ class XMPPParserTest : public CppUnit::TestFixture { Type type; boost::optional<ProtocolHeader> header; - boost::shared_ptr<ToplevelElement> element; + std::shared_ptr<ToplevelElement> element; }; Client() {} @@ -180,7 +180,7 @@ class XMPPParserTest : public CppUnit::TestFixture { events.push_back(Event(StreamStart, header)); } - void handleElement(boost::shared_ptr<ToplevelElement> element) { + void handleElement(std::shared_ptr<ToplevelElement> element) { events.push_back(Event(ElementEvent, element)); } |