Commit 9e7d9d42751f7ce19b00f8ef93df2b993323d4ef

henry 2004-09-28T02:39:21

New tests.

diff --git a/test/FTGLBitmapFont-Test.cpp b/test/FTGLBitmapFont-Test.cpp
new file mode 100644
index 0000000..17882ca
--- /dev/null
+++ b/test/FTGLBitmapFont-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLBitmapFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLBitmapFont* bitmapFont = new FTGLBitmapFont( FONT_FILE);            
+            CPPUNIT_ASSERT( bitmapFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+
diff --git a/test/FTGLExtrdFont.cpp-Test.cpp b/test/FTGLExtrdFont.cpp-Test.cpp
new file mode 100644
index 0000000..a8a85b3
--- /dev/null
+++ b/test/FTGLExtrdFont.cpp-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLExtrdFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLExtrdFont* extrudedFont = new FTGLExtrdFont( FONT_FILE);            
+            CPPUNIT_ASSERT( extrudedFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+
diff --git a/test/FTGLOutlineFont-Test.cpp b/test/FTGLOutlineFont-Test.cpp
new file mode 100644
index 0000000..000eb0b
--- /dev/null
+++ b/test/FTGLOutlineFont-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLOutlineFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLOutlineFont* outlineFont = new FTGLOutlineFont( FONT_FILE);            
+            CPPUNIT_ASSERT( outlineFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+
diff --git a/test/FTGLPixmapFont-Test.cpp b/test/FTGLPixmapFont-Test.cpp
new file mode 100644
index 0000000..c46cd1b
--- /dev/null
+++ b/test/FTGLPixmapFont-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLPixmapFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLPixmapFont* pixmapFont = new FTGLPixmapFont( FONT_FILE);            
+            CPPUNIT_ASSERT( pixmapFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+
diff --git a/test/FTGLPolygonFont-Test.cpp b/test/FTGLPolygonFont-Test.cpp
new file mode 100644
index 0000000..352531d
--- /dev/null
+++ b/test/FTGLPolygonFont-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLPolygonFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLPolygonFont* polygonFont = new FTGLPolygonFont( FONT_FILE);            
+            CPPUNIT_ASSERT( polygonFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+
diff --git a/test/FTGLTextureFont-Test.cpp b/test/FTGLTextureFont-Test.cpp
new file mode 100644
index 0000000..126d4da
--- /dev/null
+++ b/test/FTGLTextureFont-Test.cpp
@@ -0,0 +1,48 @@
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/TestCaller.h>
+#include <cppunit/TestCase.h>
+#include <cppunit/TestSuite.h>
+#include <assert.h>
+
+#include "Fontdefs.h"
+#include "FTGLTextureFont.h"
+
+extern void buildGLContext();
+
+class FTGLPolygonFontTest : public CppUnit::TestCase
+{
+    CPPUNIT_TEST_SUITE( FTGLPolygonFontTest);
+        CPPUNIT_TEST( testConstructor);
+    CPPUNIT_TEST_SUITE_END();
+        
+    public:
+        FTGLPolygonFontTest() : CppUnit::TestCase( "FTGLPolygonFont Test")
+        {
+        }
+        
+        FTGLPolygonFontTest( const std::string& name) : CppUnit::TestCase(name) {}
+        
+        ~FTGLPolygonFontTest()
+        {
+        }
+        
+        void testConstructor()
+        {
+//            buildGLContext();
+        
+            FTGLTextureFont* textureFont = new FTGLTextureFont( FONT_FILE);            
+            CPPUNIT_ASSERT( textureFont->Error() == 0);
+        
+        }
+
+        void setUp() 
+        {}
+        
+        void tearDown() 
+        {}
+                    
+    private:
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION( FTGLPolygonFontTest);
+