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

Philipp Hofer (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 13 13:29:53 UTC 2020


 basegfx/test/basegfx3d.cxx      |   20 +++++---------------
 basegfx/test/basegfxtools.cxx   |   31 +++++++++++++++----------------
 basegfx/test/boxclipper.hxx     |    7 +++----
 solenv/clang-format/excludelist |    3 ---
 4 files changed, 23 insertions(+), 38 deletions(-)

New commits:
commit 0eaf2092940dc604926d31ef11b6ffb07abedc5a
Author:     Philipp Hofer <philipp.hofer at protonmail.com>
AuthorDate: Thu Nov 12 12:48:28 2020 +0100
Commit:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
CommitDate: Fri Nov 13 14:29:07 2020 +0100

    tdf#123936 Formatting files in module basegfx with clang-format
    
    Change-Id: I29bfa5de3bfd8ad2989cba0269f48f79edd58fd4
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105645
    Tested-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
    Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>

diff --git a/basegfx/test/basegfx3d.cxx b/basegfx/test/basegfx3d.cxx
index 279cc9a67756..b03560d6588e 100644
--- a/basegfx/test/basegfx3d.cxx
+++ b/basegfx/test/basegfx3d.cxx
@@ -22,16 +22,14 @@
 
 namespace basegfx3d
 {
-
 class b3dhommatrix : public CppUnit::TestFixture
 {
 public:
-
     // insert your test code here.
     // this is only demonstration code
     void EmptyMethod()
     {
-          // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+        // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
     }
 
     // Change the following lines only, if you add, remove or rename
@@ -46,12 +44,11 @@ public:
 class b3dpoint : public CppUnit::TestFixture
 {
 public:
-
     // insert your test code here.
     // this is only demonstration code
     void EmptyMethod()
     {
-          // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+        // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
     }
 
     // Change the following lines only, if you add, remove or rename
@@ -66,11 +63,8 @@ public:
 class b3drange : public CppUnit::TestFixture
 {
 public:
-
     // insert your test code here.
-    void EmptyMethod()
-    {
-    }
+    void EmptyMethod() {}
 
     // Change the following lines only, if you add, remove or rename
     // member functions of the current class,
@@ -84,12 +78,11 @@ public:
 class b3dtuple : public CppUnit::TestFixture
 {
 public:
-
     // insert your test code here.
     // this is only demonstration code
     void EmptyMethod()
     {
-          // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
+        // CPPUNIT_ASSERT_MESSAGE("a message", 1 == 1);
     }
 
     // Change the following lines only, if you add, remove or rename
@@ -104,11 +97,8 @@ public:
 class b3dvector : public CppUnit::TestFixture
 {
 public:
-
     // insert your test code here.
-    void EmptyMethod()
-    {
-    }
+    void EmptyMethod() {}
 
     // Change the following lines only, if you add, remove or rename
     // member functions of the current class,
diff --git a/basegfx/test/basegfxtools.cxx b/basegfx/test/basegfxtools.cxx
index 7259a9980c70..a768357c13a5 100644
--- a/basegfx/test/basegfxtools.cxx
+++ b/basegfx/test/basegfxtools.cxx
@@ -28,7 +28,6 @@ using namespace ::basegfx;
 
 namespace basegfxtools
 {
-
 class KeyStopLerpTest : public CppUnit::TestFixture
 {
     utils::KeyStopLerp maKeyStops;
@@ -43,41 +42,41 @@ class KeyStopLerpTest : public CppUnit::TestFixture
     }
 
 public:
-    KeyStopLerpTest() :
-        maKeyStops(getTestVector())
-    {}
-
+    KeyStopLerpTest()
+        : maKeyStops(getTestVector())
+    {
+    }
 
     void test()
     {
         double fAlpha;
         std::ptrdiff_t nIndex;
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(-1.0);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(-1.0);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", std::ptrdiff_t(0), nIndex);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("-1.0", 0.0, fAlpha);
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.1);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.1);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", std::ptrdiff_t(0), nIndex);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.1", 0.0, fAlpha);
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.3);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.3);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.3", std::ptrdiff_t(0), nIndex);
-        CPPUNIT_ASSERT_MESSAGE("0.3", fTools::equal(fAlpha,0.5));
+        CPPUNIT_ASSERT_MESSAGE("0.3", fTools::equal(fAlpha, 0.5));
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.5);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.5);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.5", std::ptrdiff_t(0), nIndex);
-        CPPUNIT_ASSERT_MESSAGE("0.5", fTools::equal(fAlpha,1.0));
+        CPPUNIT_ASSERT_MESSAGE("0.5", fTools::equal(fAlpha, 1.0));
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.51);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.51);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex);
-        CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha,0.025));
+        CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha, 0.025));
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(0.9);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(0.9);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex);
-        CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha,1.0));
+        CPPUNIT_ASSERT_MESSAGE("0.51", fTools::equal(fAlpha, 1.0));
 
-        std::tie(nIndex,fAlpha) = maKeyStops.lerp(1.0);
+        std::tie(nIndex, fAlpha) = maKeyStops.lerp(1.0);
         CPPUNIT_ASSERT_EQUAL_MESSAGE("0.51", std::ptrdiff_t(1), nIndex);
         CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE("0.51", 1.0, fAlpha, 1E-12);
     }
diff --git a/basegfx/test/boxclipper.hxx b/basegfx/test/boxclipper.hxx
index d21ed7a422e0..03aad0d2ba74 100644
--- a/basegfx/test/boxclipper.hxx
+++ b/basegfx/test/boxclipper.hxx
@@ -23,10 +23,9 @@
 
 #include <cstddef>
 
-namespace basegfx2d {
-
-double getRandomOrdinal( const std::size_t n );
-
+namespace basegfx2d
+{
+double getRandomOrdinal(const std::size_t n);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 45d28f6d4a38..e044f12fa1e1 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -338,10 +338,7 @@ basegfx/source/workbench/bezierclip.hxx
 basegfx/source/workbench/convexhull.cxx
 basegfx/source/workbench/gauss.hxx
 basegfx/test/SvgPathImportExport.cxx
-basegfx/test/basegfx3d.cxx
-basegfx/test/basegfxtools.cxx
 basegfx/test/boxclipper.cxx
-basegfx/test/boxclipper.hxx
 basegfx/test/clipstate.cxx
 basegfx/test/genericclipper.cxx
 basic/inc/global.hxx


More information about the Libreoffice-commits mailing list