| 1 | tim | 1565 | #ifndef TEST_RECTMATRIXTEST_HPP | 
| 2 |  |  | #define TEST_RECTMATRIXTEST_HPP | 
| 3 |  |  |  | 
| 4 |  |  | #include <cppunit/extensions/HelperMacros.h> | 
| 5 |  |  | #include "math/RectMatrix.hpp" | 
| 6 |  |  |  | 
| 7 |  |  | /** | 
| 8 |  |  | * @namespace oopse | 
| 9 |  |  | */ | 
| 10 |  |  | using namespace oopse; | 
| 11 |  |  |  | 
| 12 |  |  | typedef RectMatrix<double, 2, 2> RMat2x2; | 
| 13 |  |  | typedef RectMatrix<double, 2, 3> RMat2x3; | 
| 14 |  |  | typedef RectMatrix<double, 3, 2> RMat3x2; | 
| 15 | tim | 1571 | typedef RectMatrix<double, 3, 3> RMat3x3; | 
| 16 |  |  | typedef RectMatrix<double, 3, 4> RMat3x4; | 
| 17 | tim | 1565 |  | 
| 18 | tim | 1571 | typedef Vector<double, 3> Vec3; | 
| 19 |  |  |  | 
| 20 | tim | 1565 | class RectMatrixTestCase : public CPPUNIT_NS::TestFixture { | 
| 21 |  |  | CPPUNIT_TEST_SUITE( RectMatrixTestCase ); | 
| 22 |  |  | CPPUNIT_TEST(testConstructor); | 
| 23 |  |  | CPPUNIT_TEST(testNegate); | 
| 24 |  |  | CPPUNIT_TEST(testAdd); | 
| 25 |  |  | CPPUNIT_TEST(testSub); | 
| 26 |  |  | CPPUNIT_TEST(testMul); | 
| 27 |  |  | CPPUNIT_TEST(testDiv); | 
| 28 |  |  | CPPUNIT_TEST(testAccessEntries); | 
| 29 | tim | 1595 | CPPUNIT_TEST(testRowColOperations); | 
| 30 |  |  | CPPUNIT_TEST(testOtherMemberFunctions); | 
| 31 | tim | 1565 | CPPUNIT_TEST_SUITE_END(); | 
| 32 |  |  |  | 
| 33 |  |  | public: | 
| 34 |  |  |  | 
| 35 |  |  | virtual void setUp(); | 
| 36 |  |  |  | 
| 37 |  |  | void testConstructor(); | 
| 38 |  |  | void testEqual(); | 
| 39 |  |  | void testNegate(); | 
| 40 |  |  | void testAdd(); | 
| 41 |  |  | void testSub(); | 
| 42 |  |  | void testMul(); | 
| 43 |  |  | void testDiv(); | 
| 44 |  |  | void testAccessEntries(); | 
| 45 | tim | 1596 | void testRowColOperations(); | 
| 46 | tim | 1595 | void testOtherMemberFunctions(); | 
| 47 | tim | 1565 |  | 
| 48 |  |  | private: | 
| 49 |  |  | RMat2x2 m1; | 
| 50 |  |  | RMat2x2 m2; | 
| 51 |  |  | RMat2x2 m3; | 
| 52 |  |  | RMat2x2 m4; | 
| 53 |  |  | RMat2x2 zero; | 
| 54 |  |  | RMat2x2 one; | 
| 55 |  |  | RMat2x2 two; | 
| 56 |  |  |  | 
| 57 |  |  | RMat2x3 a; | 
| 58 |  |  | RMat3x2 b; | 
| 59 | tim | 1571 | RMat2x2 c; | 
| 60 |  |  |  | 
| 61 |  |  | RMat3x3 d; | 
| 62 |  |  | RMat3x3 e; | 
| 63 |  |  | RMat3x3 f; | 
| 64 | tim | 1565 |  | 
| 65 | tim | 1571 | RMat3x3 g; | 
| 66 |  |  | RMat3x4 h; | 
| 67 |  |  | RMat3x4 i; | 
| 68 |  |  |  | 
| 69 |  |  | Vec3 v1; | 
| 70 |  |  | Vec3 v2; | 
| 71 |  |  |  | 
| 72 | tim | 1565 | double s1; | 
| 73 |  |  |  | 
| 74 |  |  | double s2; | 
| 75 |  |  |  | 
| 76 |  |  | }; | 
| 77 |  |  | #endif //TEST_RECTMATRIXTEST_HPP |