diff options
author | Philipp Hofer <philipp.hofer@protonmail.com> | 2020-11-12 12:48:28 +0100 |
---|---|---|
committer | Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> | 2020-11-13 14:29:07 +0100 |
commit | 0eaf2092940dc604926d31ef11b6ffb07abedc5a (patch) | |
tree | 0475ac33654b73b4a4993a283e9892733dc748c6 /basegfx | |
parent | 26573395db55ddbd56d4dde39c8d5e5306c7a6ce (diff) |
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@googlemail.com>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/test/basegfx3d.cxx | 20 | ||||
-rw-r--r-- | basegfx/test/basegfxtools.cxx | 31 | ||||
-rw-r--r-- | basegfx/test/boxclipper.hxx | 7 |
3 files changed, 23 insertions, 35 deletions
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: */ |