00001 /**************************************************************************** 00002 Copyright (C)2003 David Jung <opensim@pobox.com> 00003 00004 This program/file is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU General Public License as published by 00006 the Free Software Foundation; either version 2 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. (http://www.gnu.org) 00013 00014 You should have received a copy of the GNU General Public License 00015 along with this program; if not, write to the Free Software 00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 $Id: GfxTest 1030 2004-02-11 20:46:17Z jungd $ 00019 $Revision: 1.2 $ 00020 $Date: 2004-02-11 15:46:17 -0500 (Wed, 11 Feb 2004) $ 00021 $Author: jungd $ 00022 00023 ****************************************************************************/ 00024 00025 #ifndef _GFX_GFXTEST_ 00026 #define _GFX_GFXTEST_ 00027 00028 #include <cppunit/extensions/HelperMacros.h> 00029 00030 #include <gfx/gfx> 00031 #include <gfx/Line3> 00032 #include <gfx/Segment3> 00033 #include <gfx/Plane> 00034 #include <gfx/Triangle3> 00035 #include <gfx/Quad3> 00036 #include <gfx/Disc3> 00037 00038 00039 namespace gfx { 00040 00041 00042 class GfxTest : public CppUnit::TestFixture 00043 { 00044 static const Int numOfTests = 6; 00045 00046 CPPUNIT_TEST_SUITE( GfxTest ); 00047 00048 CPPUNIT_TEST( testLine ); 00049 CPPUNIT_TEST( testSegment ); 00050 CPPUNIT_TEST( testPlane ); 00051 CPPUNIT_TEST( testTriangle ); 00052 CPPUNIT_TEST( testQuad ); 00053 CPPUNIT_TEST( testDisc ); 00054 00055 CPPUNIT_TEST_SUITE_END(); 00056 00057 protected: 00058 Line3 ul, l; 00059 Segment3 us, s, s2, s3; 00060 Quad3 q1, q2; 00061 00062 public: 00063 GfxTest(); 00064 00065 int countTestCases () const { return numOfTests; } 00066 00067 void setUp(); 00068 void tearDown(); 00069 00070 void testLine(); 00071 void testSegment(); 00072 void testPlane(); 00073 void testTriangle(); 00074 void testQuad(); 00075 void testDisc(); 00076 }; 00077 00078 00079 } // gfx 00080 00081 #endif