[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk configmgr/Library_configmgr.mk configmgr/source connectivity/Library_firebird_sdbc.mk connectivity/source

2019-06-14 Thread Noel Grandin (via logerrit)
 configmgr/CppunitTest_configmgr_unit.mk  |1 
 configmgr/Library_configmgr.mk   |1 
 configmgr/source/components.cxx  |   31 +++
 connectivity/Library_firebird_sdbc.mk|1 
 connectivity/source/commontools/dbtools.cxx  |6 +-
 connectivity/source/cpool/ZPoolCollection.cxx|4 -
 connectivity/source/drivers/firebird/Blob.cxx|5 +-
 connectivity/source/drivers/hsqldb/StorageFileAccess.cxx |9 +---
 connectivity/source/drivers/writer/WConnection.cxx   |4 -
 9 files changed, 33 insertions(+), 29 deletions(-)

New commits:
commit 48b9951779630da115086ce1fe8f4ffb5b0b4530
Author: Noel Grandin 
AuthorDate: Fri Jun 14 09:32:27 2019 +0200
Commit: Noel Grandin 
CommitDate: Fri Jun 14 11:05:59 2019 +0200

loplugin:logexceptionnicely in configmgr..connectivity

Change-Id: I1cf8250dba63b744f882e54e9eb572884f292975
Reviewed-on: https://gerrit.libreoffice.org/74020
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
index 0e227edba37c..fa0718dc2c0e 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,configmgr_unit, \
sal \
salhelper \
test \
+   tl \
unotest \
xmlreader \
i18nlangtag \
diff --git a/configmgr/Library_configmgr.mk b/configmgr/Library_configmgr.mk
index 4fc2909ad600..ae4467af01b2 100644
--- a/configmgr/Library_configmgr.mk
+++ b/configmgr/Library_configmgr.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,configmgr, \
 cppuhelper \
 sal \
 salhelper \
+tl \
 xmlreader \
 i18nlangtag \
 ))
diff --git a/configmgr/source/components.cxx b/configmgr/source/components.cxx
index 9587fde1e7a5..7f2eb3afcfc0 100644
--- a/configmgr/source/components.cxx
+++ b/configmgr/source/components.cxx
@@ -51,6 +51,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include "additions.hxx"
@@ -184,9 +185,9 @@ void Components::WriteThread::execute() {
 try {
 try {
 writeModFile(components_, url_, data_);
-} catch (css::uno::RuntimeException & e) {
+} catch (css::uno::RuntimeException &) {
 // Ignore write errors, instead of aborting:
-SAL_WARN("configmgr", "error writing modifications: " << e);
+TOOLS_WARN_EXCEPTION("configmgr", "error writing modifications");
 }
 } catch (...) {
 reference_->clear();
@@ -395,10 +396,10 @@ void Components::insertModificationXcuFile(
 try {
 parseFileLeniently(
 , fileUri, Data::NO_LAYER, , modifications, 
nullptr);
-} catch (css::container::NoSuchElementException & e) {
-SAL_WARN(
+} catch (const css::container::NoSuchElementException &) {
+TOOLS_WARN_EXCEPTION(
 "configmgr",
-"error inserting non-existing \"" << fileUri << "\": " << e);
+"error inserting non-existing \"" << fileUri << "\"");
 }
 }
 
@@ -418,15 +419,15 @@ css::beans::Optional< css::uno::Any > 
Components::getExternalValue(
 try {
 service = context_->getServiceManager()->createInstanceWithContext(
 name, context_);
-} catch (css::uno::RuntimeException &) {
+} catch (const css::uno::RuntimeException &) {
 // Assuming these exceptions are real errors:
 throw;
-} catch (css::uno::Exception & e) {
+} catch (const css::uno::Exception &)  {
 // Assuming these exceptions indicate that the service is not
 // installed:
-SAL_WARN(
+TOOLS_WARN_EXCEPTION(
 "configmgr",
-"createInstance(" << name << ") failed with " << e);
+"createInstance(" << name << ") failed");
 }
 css::uno::Reference< css::beans::XPropertySet > propset;
 if (service.is()) {
@@ -650,14 +651,14 @@ void Components::parseFileLeniently(
 assert(parseFile != nullptr);
 try {
 (*parseFile)(url, layer, data_, partial, modifications, additions);
-} catch (css::container::NoSuchElementException &) {
+} catch (const css::container::NoSuchElementException &) {
 throw;
-} catch (css::uno::Exception & e) { //TODO: more specific exception 
catching
+} catch (const css::uno::Exception &) { //TODO: more specific exception 
catching
 // Ignore invalid XML files, instead of completely preventing OOo from
 // starting:
-SAL_WARN(
+TOOLS_WARN_EXCEPTION(
 "configmgr",
-"error reading \"" << url << "\": " << e);
+"error reading \"" << url << "\"");
 }
 }
 
@@ -729,8 +730,8 @@ void 

[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk solenv/gbuild svgio/CppunitTest_svgio.mk

2014-10-24 Thread Stephan Bergmann
 configmgr/CppunitTest_configmgr_unit.mk |3 ++-
 solenv/gbuild/ComponentTarget.mk|5 ++---
 solenv/gbuild/CppunitTest.mk|   12 
 svgio/CppunitTest_svgio.mk  |3 ++-
 4 files changed, 18 insertions(+), 5 deletions(-)

New commits:
commit 04bc75a9b1d5e14c5ec863fd6d0c70d02d5d9da5
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Oct 24 13:20:43 2014 +0200

Beware gb_CppunitTest_use_library_files plus gb_CppunitTest_use_component

...it causes the library's objects to be loaded twice, causing potential 
trouble
with static data.  So introduce gb_Cppunit_set_componentfile, processing the
library's source component file into an additional workdir/CppuntiTest/
component file referencing the test library.  (This required to drop the
gb_Helper_abbreviate_dirs bric-a-brac, as it would do $W replacement into 
file
URLs contained in the resulting .component file.)

Change-Id: I57847e549817d25cca53a13effd7d408e0c99f9a

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
index 18e40f2..1672c9f 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -15,6 +15,8 @@ $(eval $(call 
gb_CppunitTest_add_exception_objects,configmgr_unit, \
 configmgr/qa/unit/test \
 ))
 
+$(eval $(call 
gb_CppunitTest_set_componentfile,configmgr_unit,configmgr/source/configmgr))
+
 $(eval $(call gb_CppunitTest_use_library_objects,configmgr_unit,configmgr))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,configmgr_unit,))
@@ -37,7 +39,6 @@ $(eval $(call gb_CppunitTest_use_ure,configmgr_unit))
 $(eval $(call gb_CppunitTest_use_configuration,configmgr_unit))
 
 $(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
-configmgr/source/configmgr \
 i18npool/util/i18npool \
 i18npool/source/search/i18nsearch \
 sax/source/expatwrap/expwrap \
diff --git a/solenv/gbuild/ComponentTarget.mk b/solenv/gbuild/ComponentTarget.mk
index 5395a4a..225b198 100644
--- a/solenv/gbuild/ComponentTarget.mk
+++ b/solenv/gbuild/ComponentTarget.mk
@@ -28,12 +28,11 @@ gb_ComponentTarget_get_source = $(SRCDIR)/$(1).component
 define gb_ComponentTarget__command
 $(call gb_Output_announce,$(3),$(true),CMP,1)
 $(if $(LIBFILENAME),,$(call gb_Output_error,No LIBFILENAME set at component 
target: $(1)))
-$(call gb_Helper_abbreviate_dirs,\
mkdir -p $(dir $(1))  \
$(call gb_ExternalExecutable_get_command,xsltproc) --nonet \
--stringparam uri '$(if $(filter 
TRUE,$(DISABLE_DYNLOADING)),,$(subst \d,$$,$(COMPONENTPREFIX)))$(LIBFILENAME)' \
--stringparam cppu_env $(gb_CPPU_ENV) -o $(1) \
-   $(gb_ComponentTarget_XSLTCOMMANDFILE) $(2))
+   $(gb_ComponentTarget_XSLTCOMMANDFILE) $(2)
 endef
 
 
@@ -44,7 +43,7 @@ $(call gb_ComponentTarget_get_clean_target,%) :
 
 # when a library is renamed, the component file needs to be rebuilt to match.
 # hence simply depend on Repository{,Fixes}.mk since the command runs quickly.
-$(call gb_ComponentTarget_get_target,%) : \
+$(call gb_ComponentTarget_get_target,%) $(call 
gb_ComponentTarget_get_target,CppunitTest/%) : \
$(call gb_ComponentTarget_get_source,%) \
$(SRCDIR)/Repository.mk \
$(SRCDIR)/RepositoryFixes.mk \
diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 3c5f11c..aa259e3 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -242,6 +242,18 @@ $(call gb_CppunitTest_get_target,$(1)) : \
 
 endef
 
+define gb_CppunitTest_set_componentfile
+$(call gb_ComponentTarget_ComponentTarget,CppunitTest/$(2),\
+$(call gb_Helper_make_url,$(gb_CppunitTest_DLLDIR))/,\
+$(call gb_CppunitTest_get_filename,$(1)))
+$(call gb_CppunitTest_get_target,$(1)) : \
+$(call gb_ComponentTarget_get_target,CppunitTest/$(2))
+$(call gb_CppunitTest_get_clean_target,$(1)) : \
+$(call gb_ComponentTarget_get_clean_target,CppunitTest/$(2))
+$(call gb_CppunitTest_use_component,$(1),CppunitTest/$(2))
+
+endef
+
 # Given a list of component files, filter out those corresponding
 # to libraries not built in this configuration.
 define gb_CppunitTest__filter_not_built_components
diff --git a/svgio/CppunitTest_svgio.mk b/svgio/CppunitTest_svgio.mk
index 2aa4f39..939842d 100644
--- a/svgio/CppunitTest_svgio.mk
+++ b/svgio/CppunitTest_svgio.mk
@@ -9,6 +9,8 @@
 
 $(eval $(call gb_CppunitTest_CppunitTest,svgio_import_test))
 
+$(eval $(call gb_CppunitTest_set_componentfile,svgio_import_test,svgio/svgio))
+
 $(eval $(call gb_CppunitTest_set_include,svgio_import_test,\
 $$(INCLUDE) \
 -I$(SRCDIR)/svgio/inc \
@@ -63,7 +65,6 @@ $(eval $(call 
gb_CppunitTest_use_components,svgio_import_test,\
 ucb/source/core/ucb1 \
 ucb/source/ucp/file/ucpfile1 \
 unotools/util/utl \
-svgio/svgio \
 sax/source/expatwrap/expwrap \
 ))
 
___

[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk i18npool/Executable_gencoll_rule.mk i18npool/Executable_genindex_data.mk sc/CppunitTest_sc_rangelst_test.mk sc/CppunitTest_sc_uc

2014-04-12 Thread Tor Lillqvist
 configmgr/CppunitTest_configmgr_unit.mk |1 -
 i18npool/Executable_gencoll_rule.mk |1 -
 i18npool/Executable_genindex_data.mk|1 -
 sc/CppunitTest_sc_rangelst_test.mk  |1 -
 sc/CppunitTest_sc_ucalc.mk  |1 -
 sc/Library_sc.mk|1 -
 writerperfect/Library_wpftdraw.mk   |1 -
 writerperfect/Library_wpftwriter.mk |1 -
 8 files changed, 8 deletions(-)

New commits:
commit 6d9060a6e6aa05a556594a519cb770c1bf06f79f
Author: Tor Lillqvist t...@collabora.com
Date:   Sat Apr 12 18:35:33 2014 +0300

Unnecessary to mention dependency on icudata as only libicuuc directly uses 
it

libicudata exports a single symbol, icudt52_data (for ICU version 52), and
only libicuuc refers to it.

Change-Id: Ia04356fda20cf8109156ccd1cbbd9091e70adf27

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
index 0ab0e71..18e40f2 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -49,5 +49,4 @@ $(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
 $(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\
 boost_headers \
 icu_headers \
-icudata \
 ))
diff --git a/i18npool/Executable_gencoll_rule.mk 
b/i18npool/Executable_gencoll_rule.mk
index c1903f0..568619a 100644
--- a/i18npool/Executable_gencoll_rule.mk
+++ b/i18npool/Executable_gencoll_rule.mk
@@ -20,7 +20,6 @@ $(eval $(call gb_Executable_use_libraries,gencoll_rule,\
 ))
 
 $(eval $(call gb_Executable_use_externals,gencoll_rule,\
-   icudata \
icui18n \
icuuc \
icu_headers \
diff --git a/i18npool/Executable_genindex_data.mk 
b/i18npool/Executable_genindex_data.mk
index c95b790..0a10b13 100644
--- a/i18npool/Executable_genindex_data.mk
+++ b/i18npool/Executable_genindex_data.mk
@@ -15,7 +15,6 @@ $(eval $(call gb_Executable_use_libraries,genindex_data,\
 ))
 
 $(eval $(call gb_Executable_use_externals,genindex_data,\
-   icudata \
icui18n \
icuuc \
 ))
diff --git a/sc/CppunitTest_sc_rangelst_test.mk 
b/sc/CppunitTest_sc_rangelst_test.mk
index fb7d600..b5ae3da 100644
--- a/sc/CppunitTest_sc_rangelst_test.mk
+++ b/sc/CppunitTest_sc_rangelst_test.mk
@@ -12,7 +12,6 @@ $(eval $(call gb_CppunitTest_CppunitTest,sc_rangelst_test))
 $(eval $(call gb_CppunitTest_use_externals,sc_rangelst_test, \
boost_headers \
 icu_headers \
-icudata \
 icui18n \
 icuuc \
libxml2 \
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index b4bf31d..b9353ca 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -31,7 +31,6 @@ endif
 $(eval $(call gb_CppunitTest_use_externals,sc_ucalc,\
boost_headers \
 icu_headers \
-icudata \
 icui18n \
 icuuc \
libxml2 \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 05cefb6..b4b7425 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Library_use_sdk_api,sc))
 $(eval $(call gb_Library_use_externals,sc,\
 boost_headers \
 icu_headers \
-icudata \
 icui18n \
 icuuc \
 libxml2 \
diff --git a/writerperfect/Library_wpftdraw.mk 
b/writerperfect/Library_wpftdraw.mk
index b2cfc36..8b1a611 100644
--- a/writerperfect/Library_wpftdraw.mk
+++ b/writerperfect/Library_wpftdraw.mk
@@ -58,7 +58,6 @@ $(eval $(call gb_Library_use_externals,wpftdraw,\
libxml2 \
icui18n \
icuuc \
-   icudata \
 ))
 
 $(eval $(call gb_Library_add_exception_objects,wpftdraw,\
diff --git a/writerperfect/Library_wpftwriter.mk 
b/writerperfect/Library_wpftwriter.mk
index 81008f3..fab462b 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -53,7 +53,6 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\
ebook \
etonyek \
icui18n \
-   icudata \
icuuc \
libxml2 \
mwaw \
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk

2013-09-10 Thread Michael Meeks
 configmgr/CppunitTest_configmgr_unit.mk |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit ed1eed600b2e4afd9364ee8dacf775f897df3849
Author: Michael Meeks michael.me...@collabora.com
Date:   Tue Sep 10 17:50:02 2013 +0100

configmgr: more makefile cleanup.

Change-Id: I672077a2096cc51e7a3668f5873a91299fd00ca1

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
index 500051c..ed84ff4 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -32,18 +32,19 @@ $(eval $(call gb_CppunitTest_use_libraries,configmgr_unit, \
$(gb_UWINAPI) \
 ))
 
+$(eval $(call gb_CppunitTest_use_ure,configmgr_unit))
+
+$(eval $(call gb_CppunitTest_use_configuration,configmgr_unit))
+
 $(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
 configmgr/source/configmgr \
 fileaccess/source/fileacc \
-framework/util/fwk \
 i18npool/util/i18npool \
 i18npool/source/search/i18nsearch \
 sax/source/expatwrap/expwrap \
-sfx2/util/sfx \
 ucb/source/core/ucb1 \
 ucb/source/ucp/file/ucpfile1 \
 unoxml/source/service/unoxml \
-uui/util/uui \
 ))
 
 $(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk configmgr/qa

2013-09-10 Thread Michael Meeks
 configmgr/CppunitTest_configmgr_unit.mk |2 
 configmgr/qa/unit/test.cxx  |   77 +++-
 2 files changed, 39 insertions(+), 40 deletions(-)

New commits:
commit e9b808bd2de9183daa31bfa9c93d6539ddcb0b62
Author: Michael Meeks michael.me...@collabora.com
Date:   Tue Sep 10 16:56:18 2013 +0100

configmgr: cleanup unit test pieces.

Change-Id: I3d849a1676c638d431a15672c5a7253b70f4e610

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
index 15647b6..500051c 100644
--- a/configmgr/CppunitTest_configmgr_unit.mk
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -19,7 +19,7 @@ $(eval $(call 
gb_CppunitTest_use_library_objects,configmgr_unit,configmgr))
 
 $(eval $(call gb_CppunitTest_use_sdk_api,configmgr_unit,))
 
-$(eval $(call gb_Library_use_libraries,configmgr_unit, \
+$(eval $(call gb_CppunitTest_use_libraries,configmgr_unit, \
comphelper \
cppu \
cppuhelper \
diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx
index bf119b4..fa32488 100644
--- a/configmgr/qa/unit/test.cxx
+++ b/configmgr/qa/unit/test.cxx
@@ -52,9 +52,8 @@
 #include rtl/ustring.h
 #include rtl/ustring.hxx
 #include sal/types.h
-#include cppunit/TestFixture.h
-#include cppunit/extensions/HelperMacros.h
-#include cppunit/plugin/TestPlugIn.h
+#include comphelper/processfactory.hxx
+#include unotest/bootstrapfixturebase.hxx
 
 namespace {
 
@@ -141,11 +140,13 @@ TestThread::TestThread(
 stop_(stop), success_(true)
 {}
 
-bool TestThread::getSuccess() const {
+bool TestThread::getSuccess() const
+{
 return success_;
 }
 
-void TestThread::run() {
+void TestThread::run()
+{
 try {
 while (!stop_.check()) {
 if (!iteration()) {
@@ -179,7 +180,8 @@ ReaderThread::ReaderThread(
 create();
 }
 
-bool ReaderThread::iteration() {
+bool ReaderThread::iteration()
+{
 return test_.getKey(path_, relative_).hasValue();
 }
 
@@ -251,7 +253,8 @@ RecursiveTest::RecursiveTest(
 test_(theTest), count_(count), destroyed_(destroyed)
 {}
 
-void RecursiveTest::test() {
+void RecursiveTest::test()
+{
 properties_ = css::uno::Reference css::beans::XPropertySet (
 test_.createUpdateAccess(
 OUString(
@@ -267,7 +270,8 @@ void RecursiveTest::test() {
 properties_, css::uno::UNO_QUERY_THROW)-dispose();
 }
 
-RecursiveTest::~RecursiveTest() {
+RecursiveTest::~RecursiveTest()
+{
 *destroyed_ = true;
 }
 
@@ -301,7 +305,8 @@ SimpleRecursiveTest::SimpleRecursiveTest(
 RecursiveTest(theTest, count, destroyed)
 {}
 
-void SimpleRecursiveTest::step() const {
+void SimpleRecursiveTest::step() const
+{
 test_.setKey(
 OUString(
 RTL_CONSTASCII_USTRINGPARAM(
@@ -324,7 +329,8 @@ CrossThreadTest::CrossThreadTest(
 RecursiveTest(theTest, count, destroyed)
 {}
 
-void CrossThreadTest::step() const {
+void CrossThreadTest::step() const
+{
 osl::Condition stop;
 stop.set();
 WriterThread(
@@ -342,32 +348,18 @@ void CrossThreadTest::step() const {
 OUString(Label));
 }
 
-void Test::setUp() {
-char const * forward = getForwardString();
-rtl_uString * registry = 0;
-CPPUNIT_ASSERT(
-rtl_convertStringToUString(
-registry, forward, rtl_str_getLength(forward),
-osl_getThreadTextEncoding(),
-(RTL_TEXTTOUNICODE_FLAGS_UNDEFINED_ERROR |
- RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_ERROR |
- RTL_TEXTTOUNICODE_FLAGS_INVALID_ERROR)));
-context_ = css::uno::Reference css::uno::XComponentContext (
-css::uno::Reference css::beans::XPropertySet (
-cppu::createRegistryServiceFactory(
-OUString(registry, SAL_NO_ACQUIRE)),
-css::uno::UNO_QUERY_THROW)-getPropertyValue(
-OUString(DefaultContext)),
-css::uno::UNO_QUERY_THROW);
-provider_ = css::configuration::theDefaultProvider::get(context_);
+void Test::setUp()
+{
+provider_ = css::configuration::theDefaultProvider::get(
+comphelper::getProcessComponentContext() );
 }
 
-void Test::tearDown() {
-css::uno::Reference css::lang::XComponent (
-context_, css::uno::UNO_QUERY_THROW)-dispose();
+void Test::tearDown()
+{
 }
 
-void Test::testKeyFetch() {
+void Test::testKeyFetch()
+{
 OUString s;
 CPPUNIT_ASSERT(
 getKey(
@@ -381,7 +373,8 @@ void Test::testKeyFetch() {
 s);
 }
 
-void Test::testKeySet() {
+void Test::testKeySet()
+{
 setKey(
 OUString(/org.openoffice.Setup/Test),
 OUString(AString),
@@ -395,7 +388,8 @@ void Test::testKeySet() {
 CPPUNIT_ASSERT( s == baa );
 }
 
-void Test::testKeyReset() {
+void Test::testKeyReset()
+{
 if (resetKey(
 OUString(/org.openoffice.Setup/Test),
 OUString(AString)))
@@ -410,7 +404,8 @@ void Test::testKeyReset() {
 }
 }
 
-void Test::testSetSetMemberName() {
+void 

[Libreoffice-commits] core.git: configmgr/CppunitTest_configmgr_unit.mk configmgr/Module_configmgr.mk configmgr/qa

2013-09-10 Thread Jelle van der Waa
 configmgr/CppunitTest_configmgr_unit.mk |   53 
 configmgr/Module_configmgr.mk   |4 ++
 configmgr/qa/unit/test.cxx  |   11 +++---
 3 files changed, 63 insertions(+), 5 deletions(-)

New commits:
commit e8c26959deac60eb2b7bec7a36fccacd95914304
Author: Jelle van der Waa je...@vdwaa.nl
Date:   Tue Sep 10 17:28:03 2013 +0200

fdo#46723 enable configmgr unit tests

Change-Id: Id2a10374d207fc079093cdb9a78ac30171251e46

diff --git a/configmgr/CppunitTest_configmgr_unit.mk 
b/configmgr/CppunitTest_configmgr_unit.mk
new file mode 100644
index 000..15647b6
--- /dev/null
+++ b/configmgr/CppunitTest_configmgr_unit.mk
@@ -0,0 +1,53 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,configmgr_unit))
+
+$(eval $(call gb_CppunitTest_add_exception_objects,configmgr_unit, \
+configmgr/qa/unit/test \
+))
+
+$(eval $(call gb_CppunitTest_use_library_objects,configmgr_unit,configmgr))
+
+$(eval $(call gb_CppunitTest_use_sdk_api,configmgr_unit,))
+
+$(eval $(call gb_Library_use_libraries,configmgr_unit, \
+   comphelper \
+   cppu \
+   cppuhelper \
+   sal \
+   salhelper \
+   test \
+   unotest \
+   xmlreader \
+   i18nlangtag \
+   $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_CppunitTest_use_components,configmgr_unit,\
+configmgr/source/configmgr \
+fileaccess/source/fileacc \
+framework/util/fwk \
+i18npool/util/i18npool \
+i18npool/source/search/i18nsearch \
+sax/source/expatwrap/expwrap \
+sfx2/util/sfx \
+ucb/source/core/ucb1 \
+ucb/source/ucp/file/ucpfile1 \
+unoxml/source/service/unoxml \
+uui/util/uui \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,configmgr_unit,\
+boost_headers \
+icu_headers \
+icudata \
+))
diff --git a/configmgr/Module_configmgr.mk b/configmgr/Module_configmgr.mk
index d465efb..eb40178 100644
--- a/configmgr/Module_configmgr.mk
+++ b/configmgr/Module_configmgr.mk
@@ -17,4 +17,8 @@ $(eval $(call 
gb_Module_add_subsequentcheck_targets,configmgr,\
 JunitTest_configmgr_unoapi \
 ))
 
+#$(eval $(call gb_Module_add_check_targets,configmgr,\
+#  CppunitTest_configmgr_unit \
+#))
+
 # vim: set noet sw=4 ts=4:
diff --git a/configmgr/qa/unit/test.cxx b/configmgr/qa/unit/test.cxx
index 1e609a3..bf119b4 100644
--- a/configmgr/qa/unit/test.cxx
+++ b/configmgr/qa/unit/test.cxx
@@ -41,7 +41,6 @@
 #include com/sun/star/uno/XInterface.hpp
 #include com/sun/star/util/XChangesBatch.hpp
 #include cppuhelper/implbase1.hxx
-#include cppuhelper/servicefactory.hxx
 #include osl/conditn.hxx
 #include osl/thread.h
 #include osl/thread.hxx
@@ -53,7 +52,9 @@
 #include rtl/ustring.h
 #include rtl/ustring.hxx
 #include sal/types.h
-#include testshl/simpleheader.hxx
+#include cppunit/TestFixture.h
+#include cppunit/extensions/HelperMacros.h
+#include cppunit/plugin/TestPlugIn.h
 
 namespace {
 
@@ -478,7 +479,7 @@ void Test::testReadCommands() {
 }
 }
 n = osl_getGlobalTimer() - n;
-t_print(Reading elements took % SAL_PRIuUINT32  ms\n, n);
+printf(Reading elements took % SAL_PRIuUINT32  ms\n, n);
 css::uno::Reference css::lang::XComponent (
 access, css::uno::UNO_QUERY_THROW)-dispose();
 }
@@ -629,10 +630,10 @@ css::uno::Reference css::uno::XInterface  
Test::createUpdateAccess(
 css::uno::Sequence css::uno::Any (arg, 1));
 }
 
-CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, alltest);
+CPPUNIT_TEST_SUITE_REGISTRATION(Test);
 
 }
 
-NOADDITIONAL;
+CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits