Commit 7b7cb75e8c2acb57d44b8dc61a6945cf7e6dc2ae

henry 2003-09-19T23:37:08

Added a test for the freetype library version.

diff --git a/test/FTVectoriser-Test.cpp b/test/FTVectoriser-Test.cpp
index 66653a5..ae22817 100755
--- a/test/FTVectoriser-Test.cpp
+++ b/test/FTVectoriser-Test.cpp
@@ -255,6 +255,7 @@ static double testMesh[] =
 class FTVectoriserTest : public CppUnit::TestCase
 {
     CPPUNIT_TEST_SUITE( FTVectoriserTest);
+        CPPUNIT_TEST( testFreetypeVersion);
         CPPUNIT_TEST( testNullGlyphProcess);
         CPPUNIT_TEST( testBadGlyphProcess);
         CPPUNIT_TEST( testSimpleGlyphProcess);
@@ -271,6 +272,27 @@ class FTVectoriserTest : public CppUnit::TestCase
         
         FTVectoriserTest( const std::string& name) : CppUnit::TestCase(name)
         {}
+        
+        
+        void testFreetypeVersion()
+        {
+            setUpFreetype();
+            
+            FT_Int amajor;
+            FT_Int aminor;
+            FT_Int apatch;
+            
+            FT_Library_Version( library, &amajor, &aminor, &apatch);
+            
+            // If you hit these asserts then you have the wrong library version to run the tests.
+            // You can still run the tests but some will fail because the hinter changed in 2.1.4 
+            CPPUNIT_ASSERT( amajor == 2);
+            CPPUNIT_ASSERT( aminor == 1);
+            CPPUNIT_ASSERT( apatch == 4);
+
+            tearDownFreetype();
+        }
+        
 
         void testNullGlyphProcess()
         {