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