summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2008-04-24 14:08:36 +0000
committerIvo Hinkelmann <ihi@openoffice.org>2008-04-24 14:08:36 +0000
commit91be438d0f6b01ae10770e4c102986eb5ed3e53c (patch)
tree918054c0847686594c11e4f95d68eaccc1162186 /basegfx
parente15c847f0cde6667773ca6d3fb1d4971fefdd976 (diff)
INTEGRATION: CWS aw055 (1.10.8); FILE MERGED
2008/04/11 12:50:33 thb 1.10.8.1: #i86456# Added a unit test for the bezier closed polygon case
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/test/basegfx2d.cxx21
1 files changed, 20 insertions, 1 deletions
diff --git a/basegfx/test/basegfx2d.cxx b/basegfx/test/basegfx2d.cxx
index 455718ab000c..91505db024cd 100644
--- a/basegfx/test/basegfx2d.cxx
+++ b/basegfx/test/basegfx2d.cxx
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: basegfx2d.cxx,v $
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
* This file is part of OpenOffice.org.
*
@@ -465,6 +465,25 @@ public:
aExport = tools::exportToSvgD( aPoly );
CPPUNIT_ASSERT_MESSAGE("exporting complex polygon to SVG-D (round-trip)",
!aExport.compareToAscii(sExportString2));
+
+ const B2DPolygon aCircle(
+ tools::createPolygonFromEllipse( B2DPoint(4000,4000),
+ 1000.0, 2000.0 ));
+ aExport = tools::exportToSvgD( B2DPolyPolygon(aCircle), false, false);
+
+ // count number of spaces, in lieu of a better way - no real
+ // point in comparing with a gold standard, as fractional
+ // parts of the coordinates will differ between systems.
+ sal_Int32 nIndex=0, nCount=0;
+ do
+ {
+ rtl::OUString aToken = aExport.getToken( 0, ' ', nIndex );
+ ++nCount;
+ }
+ while ( nIndex >= 0 );
+
+ CPPUNIT_ASSERT_MESSAGE("exporting to circle does not produce the expected number of coordinates",
+ nCount==18);
}
// Change the following lines only, if you add, remove or rename