1 | /*
|
---|
2 | * cppunuit.hpp
|
---|
3 | *
|
---|
4 | * Created on: Aug 17, 2009
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef VECTORUNITTEST_HPP_
|
---|
9 | #define VECTORUNITTEST_HPP_
|
---|
10 |
|
---|
11 | #include <cppunit/extensions/HelperMacros.h>
|
---|
12 |
|
---|
13 | #include "vector.hpp"
|
---|
14 |
|
---|
15 | /********************************************** Test classes **************************************/
|
---|
16 |
|
---|
17 | class VectorTest : public CppUnit::TestFixture
|
---|
18 | {
|
---|
19 | CPPUNIT_TEST_SUITE( VectorTest) ;
|
---|
20 | CPPUNIT_TEST ( UnityTest );
|
---|
21 | CPPUNIT_TEST ( SimpleAlgebraTest );
|
---|
22 | CPPUNIT_TEST ( OperatorAlgebraTest );
|
---|
23 | CPPUNIT_TEST ( EuclidianScalarProductTest );
|
---|
24 | CPPUNIT_TEST ( EuclidianNormTest );
|
---|
25 | CPPUNIT_TEST ( EuclidianDistancesTest );
|
---|
26 | CPPUNIT_TEST ( EuclidianAnglesTest );
|
---|
27 | CPPUNIT_TEST ( ProjectionTest );
|
---|
28 | CPPUNIT_TEST ( LineIntersectionTest );
|
---|
29 | CPPUNIT_TEST ( VectorRotationTest );
|
---|
30 | CPPUNIT_TEST ( IsInParallelepipedTest );
|
---|
31 | CPPUNIT_TEST_SUITE_END();
|
---|
32 |
|
---|
33 | public:
|
---|
34 | void setUp();
|
---|
35 | void tearDown();
|
---|
36 |
|
---|
37 | void UnityTest();
|
---|
38 | void OperatorAlgebraTest();
|
---|
39 | void SimpleAlgebraTest();
|
---|
40 | void EuclidianScalarProductTest();
|
---|
41 | void EuclidianNormTest();
|
---|
42 | void EuclidianDistancesTest();
|
---|
43 | void EuclidianAnglesTest();
|
---|
44 | void ProjectionTest();
|
---|
45 | void LineIntersectionTest();
|
---|
46 | void VectorRotationTest();
|
---|
47 | void IsInParallelepipedTest();
|
---|
48 |
|
---|
49 | private:
|
---|
50 | // vector to execute tests on, may be modified during run
|
---|
51 | Vector fixture;
|
---|
52 | // never modify these during run, other tests might rely on them
|
---|
53 | Vector zero;
|
---|
54 | Vector unit;
|
---|
55 | Vector otherunit;
|
---|
56 | Vector notunit;
|
---|
57 | Vector two;
|
---|
58 | };
|
---|
59 |
|
---|
60 |
|
---|
61 | #endif /* VECTORUNITTEST_HPP_ */
|
---|