mathTest< BASECLASS > Class Template Reference

Math test class. More...

#include <mathTest.h>

List of all members.

Public Member Functions

 mathTest ()
int countTestCases () const
void setUp ()
void tearDown ()
void testConstructor ()
void testOperatorAssign ()
void testOperatorEqual ()
void testOperatorPlus ()
void testOperatorMinus ()

Private Member Functions

 CPPUNIT_TEST_SUITE (mathTest)
 CPPUNIT_TEST (testConstructor)
 CPPUNIT_TEST (testOperatorAssign)
 CPPUNIT_TEST (testOperatorEqual)
 CPPUNIT_TEST (testOperatorPlus)
 CPPUNIT_TEST (testOperatorMinus)
 CPPUNIT_TEST_SUITE_END ()


Detailed Description

template<class BASECLASS>
class mathTest< BASECLASS >

Math test class.

Definition at line 10 of file mathTest.h.


Constructor & Destructor Documentation

template<class BASECLASS>
mathTest< BASECLASS >::mathTest (  )  [inline]

Definition at line 22 of file mathTest.h.

00023        {
00024        }


Member Function Documentation

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST_SUITE ( mathTest< BASECLASS >   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST ( testConstructor   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST ( testOperatorAssign   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST ( testOperatorEqual   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST ( testOperatorPlus   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST ( testOperatorMinus   )  [private]

template<class BASECLASS>
mathTest< BASECLASS >::CPPUNIT_TEST_SUITE_END (  )  [private]

template<class BASECLASS>
int mathTest< BASECLASS >::countTestCases (  )  const [inline]

Definition at line 26 of file mathTest.h.

00027        { 
00028               return 1; 
00029        }

template<class BASECLASS>
void mathTest< BASECLASS >::setUp (  )  [inline]

Definition at line 31 of file mathTest.h.

00032        { 
00033        }

template<class BASECLASS>
void mathTest< BASECLASS >::tearDown (  )  [inline]

Definition at line 35 of file mathTest.h.

00036        { 
00037        }

template<class BASECLASS>
void mathTest< BASECLASS >::testConstructor (  )  [inline]

Definition at line 39 of file mathTest.h.

00040        {
00041               vector3 *vec = new vector3();
00042               delete vec;
00043        }

template<class BASECLASS>
void mathTest< BASECLASS >::testOperatorAssign (  )  [inline]

Definition at line 45 of file mathTest.h.

00046        { 
00047               vector3 vec, vec2(1,2,3);
00048               vec = vec2;
00049               CPPUNIT_ASSERT( vec == vec2 );
00050        }

template<class BASECLASS>
void mathTest< BASECLASS >::testOperatorEqual (  )  [inline]

Definition at line 52 of file mathTest.h.

00053        { 
00054               vector3 vec(1,2,3);
00055               CPPUNIT_ASSERT( vec[0] == 1 );
00056               CPPUNIT_ASSERT( vec[1] == 2 );
00057               CPPUNIT_ASSERT( vec[2] == 3 );
00058               CPPUNIT_ASSERT( vec == vector3(1,2,3) );
00059        }

template<class BASECLASS>
void mathTest< BASECLASS >::testOperatorPlus (  )  [inline]

Definition at line 61 of file mathTest.h.

00062        { 
00063               CPPUNIT_ASSERT( vector3(1,2,3) + vector3(10,20,30) == vector3(11,22,33) );
00064        }

template<class BASECLASS>
void mathTest< BASECLASS >::testOperatorMinus (  )  [inline]

Definition at line 66 of file mathTest.h.

00067        { 
00068               CPPUNIT_ASSERT( vector3(1,2,3) - vector3(10,20,30) == vector3(-9,-18,-27) );
00069        }


The documentation for this class was generated from the following file:

Generated on Tue Mar 10 14:41:38 2009 for VRUT by  doxygen 1.5.5