From 09b637e36528165f5e937a418640d95440dac9ef Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 23 Sep 2015 12:08:32 +0100 Subject: boost::scoped_ptr->std::unique_ptr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I03020e3536ee692a96224a517794c0d0a294f607 Reviewed-on: https://gerrit.libreoffice.org/18793 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- writerperfect/qa/unit/DirectoryStreamTest.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'writerperfect/qa') diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx index 209fe1590f9b..6ab8d384e20c 100644 --- a/writerperfect/qa/unit/DirectoryStreamTest.cxx +++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx @@ -7,7 +7,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include +#include #include @@ -22,7 +22,7 @@ namespace ucb = com::sun::star::ucb; namespace uno = com::sun::star::uno; -using boost::scoped_ptr; +using std::unique_ptr; using librevenge::RVNGInputStream; @@ -74,17 +74,17 @@ DirectoryStreamTest::DirectoryStreamTest() void DirectoryStreamTest::testConstruction() { - const scoped_ptr pDir(DirectoryStream::createForParent(m_xFile)); + const unique_ptr pDir(DirectoryStream::createForParent(m_xFile)); CPPUNIT_ASSERT(bool(pDir)); CPPUNIT_ASSERT(pDir->isStructured()); // this should work for dirs too - const scoped_ptr pDir2(DirectoryStream::createForParent(m_xDir)); + const unique_ptr pDir2(DirectoryStream::createForParent(m_xDir)); CPPUNIT_ASSERT(bool(pDir2)); CPPUNIT_ASSERT(pDir2->isStructured()); // for nonexistent dirs nothing is created - const scoped_ptr pNondir(DirectoryStream::createForParent(m_xNonexistent)); + const unique_ptr pNondir(DirectoryStream::createForParent(m_xNonexistent)); CPPUNIT_ASSERT(!pNondir); // even if we try harder, just an empty shell is created @@ -125,7 +125,7 @@ void DirectoryStreamTest::testDataOperations() void lcl_testStructuredOperations(RVNGInputStream &rStream) { CPPUNIT_ASSERT(rStream.isStructured()); - scoped_ptr pSubstream(rStream.getSubStreamByName("mimetype")); + unique_ptr pSubstream(rStream.getSubStreamByName("mimetype")); CPPUNIT_ASSERT(bool(pSubstream)); // TODO: test for other operations when they are implemented =) @@ -136,7 +136,7 @@ void DirectoryStreamTest::testStructuredOperations() DirectoryStream aDir(m_xDir); lcl_testStructuredOperations(aDir); - scoped_ptr pDir(DirectoryStream::createForParent(m_xFile)); + unique_ptr pDir(DirectoryStream::createForParent(m_xFile)); CPPUNIT_ASSERT(bool(pDir)); lcl_testStructuredOperations(*pDir.get()); } -- cgit