Added a test for the freetype library version.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
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()
{