diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-30 15:06:34 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2018-08-30 18:49:45 +0200 |
commit | 416a543824caa01a07ab96f1764769d4f234f213 (patch) | |
tree | e3d56366e24ffc765e015ff22082fd4ac22b991e /salhelper/qa | |
parent | 81fac013cb365d711ad78a566ee1b5b13480b013 (diff) |
Remove redundant asserts after new
Also remove SlideSorter::CreateController which only calls new;
fix a memory leak in osl_Security's MyTestPlugInImpl::initialize
Change-Id: I70b6e888984f8543adbf879162e752556d2b3f0e
Reviewed-on: https://gerrit.libreoffice.org/59805
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'salhelper/qa')
-rw-r--r-- | salhelper/qa/test_api.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx index badde099e117..56cc571dd6b4 100644 --- a/salhelper/qa/test_api.cxx +++ b/salhelper/qa/test_api.cxx @@ -220,15 +220,14 @@ void Test::testSimpleReferenceObject() { void Test::testDerivedCondition() { osl::Mutex mutex; + // Next line tests that new doesn't throw std::unique_ptr< salhelper::Condition > p(new DerivedCondition(mutex)); - CPPUNIT_ASSERT(dynamic_cast< DerivedCondition * >(p.get()) != nullptr); } void Test::testDerivedConditionWaiterTimedout() { + // Next line tests that new doesn't throw std::unique_ptr< salhelper::ConditionWaiter::timedout > p( new DerivedConditionWaiterTimedout); - CPPUNIT_ASSERT( - dynamic_cast< DerivedConditionWaiterTimedout * >(p.get()) != nullptr); try { throw DerivedConditionWaiterTimedout(); } catch (salhelper::ConditionWaiter::timedout &) { |