[Libreoffice-commits] .: 2 commits - basegfx/test
Michael Meeks
michael at kemper.freedesktop.org
Tue Feb 21 07:29:05 PST 2012
basegfx/test/basegfx2d.cxx | 116 +++++++--------------------------------------
1 file changed, 20 insertions(+), 96 deletions(-)
New commits:
commit 5dde19c453bce729879601161f52a3185b44f195
Author: Michael Meeks <michael.meeks at suse.com>
Date: Tue Feb 21 15:27:42 2012 +0000
remove redundant/empty setup/tear-down methods from unit tests
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index 325d0bd..26ec7d3 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -291,14 +291,6 @@ class b2drange : public CppUnit::TestFixture
{
private:
public:
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
void check()
{
CPPUNIT_ASSERT_MESSAGE("simple range rounding from double to integer",
@@ -318,12 +310,6 @@ class b2dpolyrange : public CppUnit::TestFixture
{
private:
public:
- void setUp()
- {}
-
- void tearDown()
- {}
-
void check()
{
B2DPolyRange aRange;
@@ -734,15 +720,6 @@ public:
class b2dpoint : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
// this is only demonstration code
void EmptyMethod()
@@ -763,15 +740,6 @@ public:
class b2dpolygon : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
void testBasics()
{
@@ -838,15 +806,6 @@ public:
class b2dpolygontools : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
// this is only demonstration code
void testIsRectangle()
@@ -927,15 +886,6 @@ public:
class b2dpolypolygon : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
void EmptyMethod()
{
@@ -953,15 +903,6 @@ public:
class b1Xrange : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
template<class Type> void implCheck()
{
// test interval axioms
@@ -1028,15 +969,6 @@ public:
class b1ibox : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
void TestBox()
{
// test axioms - markedly different from proper mathematical
@@ -1096,15 +1028,6 @@ public:
class b2Xrange : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
template<class Type> void implCheck()
{
// cohen sutherland clipping
@@ -1145,15 +1068,6 @@ public:
class b2ibox : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
void TestBox()
{
// cohen sutherland clipping
@@ -1187,15 +1101,6 @@ public:
class b2dtuple : public CppUnit::TestFixture
{
public:
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
// this is only demonstration code
void EmptyMethod()
@@ -1235,16 +1140,6 @@ public:
maCyan(0,1,1)
{}
-
- // initialise your test code values here.
- void setUp()
- {
- }
-
- void tearDown()
- {
- }
-
// insert your test code here.
void hslTest()
{
commit 49e5d3f0e39ffaa4a76ebf4e15da92840578288b
Author: Korrawit Pruegsanusak <detective.conan.1412 at gmail.com>
Date: Tue Feb 21 15:24:10 2012 +0000
Add unit test for B2DRange's fround
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index d6e26a8..325d0bd 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -49,6 +49,7 @@
#include <basegfx/range/b1drange.hxx>
#include <basegfx/range/b1irange.hxx>
#include <basegfx/range/b1ibox.hxx>
+#include <basegfx/range/b2drange.hxx>
#include <basegfx/range/b2dpolyrange.hxx>
#include <basegfx/numeric/ftools.hxx>
#include <basegfx/color/bcolor.hxx>
@@ -286,6 +287,33 @@ public:
SAL_CPPUNIT_TEST_SUITE_END();
}; // class b2dsvgdimpex
+class b2drange : public CppUnit::TestFixture
+{
+private:
+public:
+ void setUp()
+ {
+ }
+
+ void tearDown()
+ {
+ }
+
+ void check()
+ {
+ CPPUNIT_ASSERT_MESSAGE("simple range rounding from double to integer",
+ fround(B2DRange(1.2, 2.3, 3.5, 4.8)) == B2IRange(1, 2, 4, 5));
+ }
+
+ // Change the following lines only, if you add, remove or rename
+ // member functions of the current class,
+ // because these macros are need by auto register mechanism.
+
+ SAL_CPPUNIT_TEST_SUITE(b2drange);
+ CPPUNIT_TEST(check);
+ SAL_CPPUNIT_TEST_SUITE_END();
+};
+
class b2dpolyrange : public CppUnit::TestFixture
{
private:
@@ -1361,6 +1389,7 @@ public:
// -----------------------------------------------------------------------------
CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dsvgdimpex);
+CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2drange);
CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpolyrange);
CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dhommatrix);
CPPUNIT_TEST_SUITE_REGISTRATION(basegfx2d::b2dpoint);
More information about the Libreoffice-commits
mailing list