Commit 7cc0320a0c33a4a757b3248024f63307d93abe12

henry 2003-05-04T20:59:09

Added test for broken contour tags

diff --git a/test/FTContour-Test.cpp b/test/FTContour-Test.cpp
index e268fe8..55cda22 100755
--- a/test/FTContour-Test.cpp
+++ b/test/FTContour-Test.cpp
@@ -22,13 +22,20 @@ static FT_Vector straightLinePoints[3] =
     { 9, -2}
 };
 
-static char straightLineTags[3] = 
+static char straightLineTags[3] =
 {
     FT_Curve_Tag_On,
     FT_Curve_Tag_On,
     FT_Curve_Tag_On
 };
 
+static char brokenTags[3] =
+{
+    FT_Curve_Tag_Conic,
+    69,
+    FT_Curve_Tag_On
+};
+
 static FT_Vector simpleConicPoints[3] = 
 {
     { 0,  0},
@@ -160,10 +167,13 @@ class FTContourTest : public CppUnit::TestCase
             CPPUNIT_ASSERT( contour.PointCount() == 1);
 
             FTContour shortContour( shortLine, simpleConicTags, 2);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL( 6, shortContour.PointCount(), 0.0);
+            CPPUNIT_ASSERT( shortContour.PointCount() == 6);
 
             FTContour reallyShortContour( shortLine, simpleConicTags, 1);
-            CPPUNIT_ASSERT_DOUBLES_EQUAL( 1, reallyShortContour.PointCount(), 0.0);
+            CPPUNIT_ASSERT( reallyShortContour.PointCount() == 1);
+
+            FTContour brokenTagtContour( shortLine, brokenTags, 3);
+            CPPUNIT_ASSERT( brokenTagtContour.PointCount() == 7);
         }