#ifndef __TEST_CARTESIAN_COMPLEX_MATH_H__ #define __TEST_CARTESIAN_COMPLEX_MATH_H__ #include "cppunit/TestFixture.h" #include "cppunit/TestSuite.h" #include "cppunit/extensions/HelperMacros.h" #include "CartesianComplex.h" using namespace CppUnit; using namespace std; /** * @author Keith Lee * keithlee [ at ] unc.edu */ class TestCartesianComplexMath : public CppUnit::TestFixture { private: //create a suite of tests CPPUNIT_TEST_SUITE( TestCartesianComplexMath ); CPPUNIT_TEST( testAddition ); CPPUNIT_TEST( testSubtraction ); CPPUNIT_TEST( testMultiplication ); CPPUNIT_TEST( testDivision ); //CPPUNIT_TEST_EXCEPTION( testDivisionByZero ); CPPUNIT_TEST_SUITE_END( ); //variables CartesianComplex *cc0_0, *cc1_0, *cc0_1; public: //define fixture functions void setUp( ); void tearDown( ); //define test functions listed in test suite void testAddition( ); void testSubtraction( ); void testMultiplication( ); void testDivision( ); //void testDivisionByZero( ); }; //register test suite for auto lookup and run CPPUNIT_TEST_SUITE_REGISTRATION( TestCartesianComplexMath ); #endif