[Libreoffice-commits] core.git: include/test solenv/clang-format test/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sat Dec 1 02:03:43 UTC 2018


 include/test/container/xelementaccess.hxx |   28 ++++++++++++++++++----------
 solenv/clang-format/blacklist             |    2 --
 test/source/container/xelementaccess.cxx  |   19 +++++++++++--------
 3 files changed, 29 insertions(+), 20 deletions(-)

New commits:
commit 71636d5606116e432a69b03d85c4282a6452c7fb
Author:     Jens Carl <j.carl43 at gmx.de>
AuthorDate: Fri Nov 30 20:55:34 2018 +0000
Commit:     Jens Carl <j.carl43 at gmx.de>
CommitDate: Sat Dec 1 03:03:15 2018 +0100

    Enable XElementAccess test cases
    
    The class XElementAccess was missing the macro OOO_DLLPUBLIC_TEST,
    and so it wasn't possible to use these test cases.
    
    Change-Id: I358bb840c6088ea25b60ee57b8c69f31ab71ddbb
    Reviewed-on: https://gerrit.libreoffice.org/64363
    Tested-by: Jenkins
    Reviewed-by: Jens Carl <j.carl43 at gmx.de>

diff --git a/include/test/container/xelementaccess.hxx b/include/test/container/xelementaccess.hxx
index efdca128fe79..d9796a2f6c86 100644
--- a/include/test/container/xelementaccess.hxx
+++ b/include/test/container/xelementaccess.hxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -10,29 +10,37 @@
 #ifndef INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
 #define INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
 
-#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+
 #include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/Type.hxx>
 
-namespace apitest {
+#include <test/testdllapi.hxx>
 
-class XElementAccess
+namespace apitest
+{
+class OOO_DLLPUBLIC_TEST XElementAccess
 {
 public:
-    XElementAccess(css::uno::Type const & rType): maType(rType) {}
+    XElementAccess(css::uno::Type const& rType)
+        : m_aType(rType)
+    {
+    }
 
     void testGetElementType();
     void testHasElements();
 
-    virtual css::uno::Reference< css::uno::XInterface > init() = 0;
+    virtual css::uno::Reference<css::uno::XInterface> init() = 0;
 
-    virtual ~XElementAccess() {}
+protected:
+    ~XElementAccess() {}
 
 private:
-    css::uno::Type const maType;
+    css::uno::Type const m_aType;
 };
 
-}
+} // namespace apitest
 
 #endif // INCLUDED_TEST_CONTAINER_XELEMENTACCESS_HXX
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist
index 9b4f7770921d..4693499b7f0e 100644
--- a/solenv/clang-format/blacklist
+++ b/solenv/clang-format/blacklist
@@ -7576,7 +7576,6 @@ include/test/beans/xpropertyset.hxx
 include/test/bootstrapfixture.hxx
 include/test/calc_unoapi_test.hxx
 include/test/callgrind.hxx
-include/test/container/xelementaccess.hxx
 include/test/container/xindexaccess.hxx
 include/test/container/xnamecontainer.hxx
 include/test/container/xnamed.hxx
@@ -16569,7 +16568,6 @@ test/source/beans/xpropertyset.cxx
 test/source/bootstrapfixture.cxx
 test/source/calc_unoapi_test.cxx
 test/source/callgrind.cxx
-test/source/container/xelementaccess.cxx
 test/source/container/xindexaccess.cxx
 test/source/container/xnamecontainer.cxx
 test/source/container/xnamed.cxx
diff --git a/test/source/container/xelementaccess.cxx b/test/source/container/xelementaccess.cxx
index d6d4472e984f..d751fef4ff1b 100644
--- a/test/source/container/xelementaccess.cxx
+++ b/test/source/container/xelementaccess.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
 /*
  * This file is part of the LibreOffice project.
  *
@@ -8,26 +8,29 @@
  */
 
 #include <test/container/xelementaccess.hxx>
+
 #include <com/sun/star/container/XElementAccess.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+
 #include <cppunit/extensions/HelperMacros.h>
 
 using namespace css;
 using namespace css::uno;
 
-namespace apitest {
-
+namespace apitest
+{
 void XElementAccess::testGetElementType()
 {
-    uno::Reference< container::XElementAccess > xElementAccess(init(), UNO_QUERY_THROW);
-    CPPUNIT_ASSERT_EQUAL(maType, xElementAccess->getElementType());
+    uno::Reference<container::XElementAccess> xElementAccess(init(), UNO_QUERY_THROW);
+    CPPUNIT_ASSERT_EQUAL(m_aType, xElementAccess->getElementType());
 }
 
 void XElementAccess::testHasElements()
 {
-    uno::Reference< container::XElementAccess > xElementAccess(init(), UNO_QUERY_THROW);
+    uno::Reference<container::XElementAccess> xElementAccess(init(), UNO_QUERY_THROW);
     CPPUNIT_ASSERT(xElementAccess->hasElements());
 }
 
-}
+} // namespace apitest
 
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */


More information about the Libreoffice-commits mailing list