| 6 |
|
|
| 7 |
|
using namespace oopse; |
| 8 |
|
|
| 9 |
– |
|
| 10 |
– |
typedef Vector<double, 3> Vec3; |
| 9 |
|
typedef Vector<double, 4> Vec4; |
| 10 |
|
|
| 11 |
|
class VectorTestCase : public CPPUNIT_NS::TestFixture { |
| 18 |
|
|
| 19 |
|
public: |
| 20 |
|
virtual void setUp(); |
| 23 |
– |
virtual void tearDown(); |
| 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 |