| 1 | 
tim | 
95 | 
#ifndef TEST_VECTORTESTCASE_HPP | 
| 2 | 
  | 
  | 
#define TEST_VECTORTESTCASE_HPP | 
| 3 | 
  | 
  | 
 | 
| 4 | 
  | 
  | 
#include <cppunit/extensions/HelperMacros.h> | 
| 5 | 
  | 
  | 
#include "math/Vector.hpp" | 
| 6 | 
  | 
  | 
  | 
| 7 | 
gezelter | 
1390 | 
using namespace OpenMD; | 
| 8 | 
tim | 
95 | 
 | 
| 9 | 
  | 
  | 
typedef Vector<double, 4> Vec4; | 
| 10 | 
  | 
  | 
 | 
| 11 | 
tim | 
100 | 
class VectorTestCase : public CPPUNIT_NS::TestFixture { | 
| 12 | 
  | 
  | 
    CPPUNIT_TEST_SUITE( VectorTestCase ); | 
| 13 | 
  | 
  | 
    CPPUNIT_TEST(testConstructors); | 
| 14 | 
  | 
  | 
    CPPUNIT_TEST(testArithmetic); | 
| 15 | 
tim | 
95 | 
    CPPUNIT_TEST(testAccessEntries); | 
| 16 | 
tim | 
102 | 
    CPPUNIT_TEST(testOtherMemberFunctions); | 
| 17 | 
tim | 
100 | 
    CPPUNIT_TEST(testOtherTemplateFunctions); | 
| 18 | 
tim | 
95 | 
    CPPUNIT_TEST_SUITE_END(); | 
| 19 | 
  | 
  | 
 | 
| 20 | 
  | 
  | 
    public: | 
| 21 | 
  | 
  | 
        virtual void setUp(); | 
| 22 | 
  | 
  | 
 | 
| 23 | 
tim | 
100 | 
        void testConstructors(); | 
| 24 | 
  | 
  | 
        void testArithmetic(); | 
| 25 | 
  | 
  | 
        void testOperators(); | 
| 26 | 
  | 
  | 
        void testAccessEntries(); | 
| 27 | 
tim | 
102 | 
        void testOtherMemberFunctions(); | 
| 28 | 
tim | 
100 | 
        void testOtherTemplateFunctions(); | 
| 29 | 
tim | 
101 | 
 | 
| 30 | 
  | 
  | 
    private: | 
| 31 | 
  | 
  | 
        Vec4 zero; | 
| 32 | 
  | 
  | 
        Vec4 one; | 
| 33 | 
  | 
  | 
        Vec4 two; | 
| 34 | 
  | 
  | 
        Vec4 v1; | 
| 35 | 
  | 
  | 
        Vec4 v2; | 
| 36 | 
  | 
  | 
        Vec4 v3; | 
| 37 | 
  | 
  | 
 | 
| 38 | 
  | 
  | 
        double s1; | 
| 39 | 
  | 
  | 
        double s2; | 
| 40 | 
tim | 
95 | 
         | 
| 41 | 
tim | 
101 | 
    | 
| 42 | 
tim | 
95 | 
}; | 
| 43 | 
  | 
  | 
 | 
| 44 | 
  | 
  | 
#endif //TEST_VECTORTESTCASE_HPP |