1 |
#ifndef TEST_SQUAREMATRIXTESTCASE_HPP |
2 |
#define TEST_SQUAREMATRIXTESTCASE_HPP |
3 |
|
4 |
#include <cppunit/extensions/HelperMacros.h> |
5 |
#include "math/SquareMatrix.hpp" |
6 |
|
7 |
using namespace OpenMD; |
8 |
|
9 |
typedef SquareMatrix<double, 3> SMat3x3; |
10 |
|
11 |
class SquareMatrixTestCase : public CPPUNIT_NS::TestFixture { |
12 |
CPPUNIT_TEST_SUITE( SquareMatrixTestCase ); |
13 |
CPPUNIT_TEST(testConstructor); |
14 |
CPPUNIT_TEST(testIdentity); |
15 |
CPPUNIT_TEST(testJacobi); |
16 |
CPPUNIT_TEST(testTrace); |
17 |
CPPUNIT_TEST(testIsSymmertric); |
18 |
CPPUNIT_TEST(testIsOrthogonal); |
19 |
CPPUNIT_TEST(testIsDiagonal); |
20 |
CPPUNIT_TEST(testIsUnitMatrix); |
21 |
CPPUNIT_TEST_SUITE_END(); |
22 |
|
23 |
public: |
24 |
virtual void setUp(); |
25 |
|
26 |
void testConstructor(); |
27 |
void testIdentity(); |
28 |
void testJacobi(); |
29 |
void testTrace(); |
30 |
void testIsSymmertric(); |
31 |
void testIsOrthogonal(); |
32 |
void testIsDiagonal(); |
33 |
void testIsUnitMatrix(); |
34 |
|
35 |
private: |
36 |
|
37 |
SMat3x3 identMat; |
38 |
SMat3x3 invMat; |
39 |
SMat3x3 symMat; |
40 |
SMat3x3 ortMat; |
41 |
SMat3x3 diagMat; |
42 |
SMat3x3 unitMat; |
43 |
|
44 |
}; |
45 |
|
46 |
#endif // TEST_SQUAREMATRIXTESTCASE_HPP |