From 0ea421781b16b449045e66c38007374ab2f2c509 Mon Sep 17 00:00:00 2001 From: Radu Ioan Date: Mon, 8 Oct 2012 22:07:39 +0300 Subject: fdo#39625 Make existing cppunittests work MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make salhelper testapi cppunit work - removed call to simpleheader.hxx - added call in Module_sal.mk for sal_testapi - created mk for cppunittest for sal_testapi - fixed some compile warning for auto_ptr Change-Id: I07a58dbd5282f92604f58eb450e0bf549c54c6b3 Reviewed-on: https://gerrit.libreoffice.org/839 Reviewed-by: Muthu Subramanian K Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- salhelper/qa/test_api.cxx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'salhelper/qa') diff --git a/salhelper/qa/test_api.cxx b/salhelper/qa/test_api.cxx index 2566b9a912e3..afddab10c204 100644 --- a/salhelper/qa/test_api.cxx +++ b/salhelper/qa/test_api.cxx @@ -48,11 +48,14 @@ std::type_info const & getSimpleReferenceObjectTypeInfo() } -#include "testshl/simpleheader.hxx" #include "osl/mutex.hxx" #include "salhelper/condition.hxx" #include "salhelper/dynload.hxx" #include "salhelper/simplereferenceobject.hxx" +#include +#include +#include +#include #include @@ -208,12 +211,12 @@ void Test::testSimpleReferenceObject() { void Test::testDerivedCondition() { osl::Mutex mutex; - std::auto_ptr< salhelper::Condition > p(new DerivedCondition(mutex)); + boost::scoped_ptr< salhelper::Condition > p(new DerivedCondition(mutex)); CPPUNIT_ASSERT(dynamic_cast< DerivedCondition * >(p.get()) != 0); } void Test::testDerivedConditionWaiterTimedout() { - std::auto_ptr< salhelper::ConditionWaiter::timedout > p( + boost::scoped_ptr< salhelper::ConditionWaiter::timedout > p( new DerivedConditionWaiterTimedout); CPPUNIT_ASSERT( dynamic_cast< DerivedConditionWaiterTimedout * >(p.get()) != 0); @@ -235,10 +238,10 @@ void Test::testDerivedSimpleReferenceObject() { } } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit