summaryrefslogtreecommitdiffstats
path: root/basebmp/test
diff options
context:
space:
mode:
Diffstat (limited to 'basebmp/test')
-rw-r--r--basebmp/test/basictest.cxx16
-rw-r--r--basebmp/test/polytest.cxx2
2 files changed, 18 insertions, 0 deletions
diff --git a/basebmp/test/basictest.cxx b/basebmp/test/basictest.cxx
index 246a25a5e7a1..63292729d419 100644
--- a/basebmp/test/basictest.cxx
+++ b/basebmp/test/basictest.cxx
@@ -116,6 +116,21 @@ public:
(*pDevice->getPalette())[1] == Color(0xFFFFFFFF) );
}
+ void testClone()
+ {
+ const basegfx::B2ISize aSize(101,101);
+ basegfx::B2ISize aSize2(3,3);
+ BitmapDeviceSharedPtr pDevice( createBitmapDevice( aSize,
+ true,
+ Format::ONE_BIT_MSB_PAL ));
+
+ BitmapDeviceSharedPtr pClone( cloneBitmapDevice(
+ aSize2,
+ pDevice ));
+ CPPUNIT_ASSERT_MESSAGE("right size",
+ pClone->getSize() == aSize2 );
+ }
+
void testPixelFuncs()
{
// 1bpp
@@ -288,6 +303,7 @@ public:
CPPUNIT_TEST_SUITE(BasicTest);
CPPUNIT_TEST(colorTest);
CPPUNIT_TEST(testConstruction);
+ CPPUNIT_TEST(testClone);
CPPUNIT_TEST(testPixelFuncs);
CPPUNIT_TEST_SUITE_END();
};
diff --git a/basebmp/test/polytest.cxx b/basebmp/test/polytest.cxx
index 177557cec565..8cc51d4921ee 100644
--- a/basebmp/test/polytest.cxx
+++ b/basebmp/test/polytest.cxx
@@ -192,6 +192,8 @@ private:
BitmapDeviceSharedPtr pClippedDevice(
subsetBitmapDevice( rDevice,
basegfx::B2IBox(3,3,5,8) ));
+ CPPUNIT_ASSERT_MESSAGE("size of subsetted device is not (2,5)",
+ pClippedDevice->getSize() == basegfx::B2IVector(2,5));
rDevice->clear(aBgCol);
pClippedDevice->fillPolyPolygon(