| [11cc05] | 1 | /* | 
|---|
|  | 2 | * SphericalPointDistributionUnitTest.hpp | 
|---|
|  | 3 | * | 
|---|
|  | 4 | *  Created on: May 29, 2014 | 
|---|
|  | 5 | *      Author: heber | 
|---|
|  | 6 | */ | 
|---|
|  | 7 |  | 
|---|
|  | 8 | #ifndef SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ | 
|---|
|  | 9 | #define SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ | 
|---|
|  | 10 |  | 
|---|
|  | 11 | // include config.h | 
|---|
|  | 12 | #ifdef HAVE_CONFIG_H | 
|---|
|  | 13 | #include <config.h> | 
|---|
|  | 14 | #endif | 
|---|
|  | 15 |  | 
|---|
|  | 16 |  | 
|---|
|  | 17 | #include <cppunit/extensions/HelperMacros.h> | 
|---|
|  | 18 |  | 
|---|
|  | 19 | /********************************************** Test classes **************************************/ | 
|---|
|  | 20 |  | 
|---|
| [42c742] | 21 | /** Template specialization needs to be in front of adding the test via CPPUNIT_TEST | 
|---|
|  | 22 | * Hence,we put it in an extra class and inherit the functions. | 
|---|
|  | 23 | */ | 
|---|
|  | 24 | struct SphericalPointDistributionTest_assistant | 
|---|
| [11cc05] | 25 | { | 
|---|
| [42c742] | 26 | public: | 
|---|
|  | 27 | template <int N> | 
|---|
|  | 28 | void getConnectionTest(); | 
|---|
|  | 29 | }; | 
|---|
|  | 30 |  | 
|---|
|  | 31 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<0>(); | 
|---|
|  | 32 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<1>(); | 
|---|
|  | 33 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<2>(); | 
|---|
|  | 34 |  | 
|---|
|  | 35 | #include "SphericalPointDistributionUnitTest_assistant.hpp" | 
|---|
|  | 36 |  | 
|---|
|  | 37 | class SphericalPointDistributionTest : | 
|---|
|  | 38 | public CppUnit::TestFixture, | 
|---|
|  | 39 | public SphericalPointDistributionTest_assistant | 
|---|
|  | 40 | { | 
|---|
|  | 41 |  | 
|---|
|  | 42 | private: | 
|---|
| [11cc05] | 43 | CPPUNIT_TEST_SUITE( SphericalPointDistributionTest) ; | 
|---|
| [a2f8a9] | 44 | CPPUNIT_TEST( calculateCenterOfMinimumDistanceTest ); | 
|---|
| [3da643] | 45 | CPPUNIT_TEST ( areEqualToWithinBoundsTest ); | 
|---|
| [1ae9aa] | 46 | CPPUNIT_TEST ( joinPointsTest ); | 
|---|
| [42c742] | 47 | CPPUNIT_TEST ( getConnectionTest<0> ); | 
|---|
|  | 48 | CPPUNIT_TEST ( getConnectionTest<1> ); | 
|---|
|  | 49 | CPPUNIT_TEST ( getConnectionTest<2> ); | 
|---|
|  | 50 | CPPUNIT_TEST ( getConnectionTest<3> ); | 
|---|
|  | 51 | CPPUNIT_TEST ( getConnectionTest<4> ); | 
|---|
|  | 52 | CPPUNIT_TEST ( getConnectionTest<5> ); | 
|---|
|  | 53 | CPPUNIT_TEST ( getConnectionTest<6> ); | 
|---|
|  | 54 | CPPUNIT_TEST ( getConnectionTest<7> ); | 
|---|
|  | 55 | CPPUNIT_TEST ( getConnectionTest<8> ); | 
|---|
|  | 56 | CPPUNIT_TEST ( getConnectionTest<9> ); | 
|---|
|  | 57 | CPPUNIT_TEST ( getConnectionTest<10> ); | 
|---|
|  | 58 | CPPUNIT_TEST ( getConnectionTest<11> ); | 
|---|
|  | 59 | CPPUNIT_TEST ( getConnectionTest<12> ); | 
|---|
|  | 60 | CPPUNIT_TEST ( getConnectionTest<14> ); | 
|---|
| [11cc05] | 61 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_2 ); | 
|---|
|  | 62 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_3 ); | 
|---|
| [d734ff] | 63 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_4 ); | 
|---|
|  | 64 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_5 ); | 
|---|
|  | 65 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_6 ); | 
|---|
|  | 66 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_7 ); | 
|---|
|  | 67 | CPPUNIT_TEST ( matchSphericalPointDistributionsTest_8 ); | 
|---|
| [42c742] | 68 | //    CPPUNIT_TEST ( matchSphericalPointDistributionsTest_multiple ); | 
|---|
| [11cc05] | 69 | CPPUNIT_TEST_SUITE_END(); | 
|---|
|  | 70 |  | 
|---|
|  | 71 | public: | 
|---|
|  | 72 | void setUp(); | 
|---|
|  | 73 | void tearDown(); | 
|---|
| [a2f8a9] | 74 | void calculateCenterOfMinimumDistanceTest(); | 
|---|
| [3da643] | 75 | void areEqualToWithinBoundsTest(); | 
|---|
| [1ae9aa] | 76 | void joinPointsTest(); | 
|---|
| [11cc05] | 77 | void matchSphericalPointDistributionsTest_2(); | 
|---|
|  | 78 | void matchSphericalPointDistributionsTest_3(); | 
|---|
| [d734ff] | 79 | void matchSphericalPointDistributionsTest_4(); | 
|---|
|  | 80 | void matchSphericalPointDistributionsTest_5(); | 
|---|
|  | 81 | void matchSphericalPointDistributionsTest_6(); | 
|---|
|  | 82 | void matchSphericalPointDistributionsTest_7(); | 
|---|
|  | 83 | void matchSphericalPointDistributionsTest_8(); | 
|---|
| [23c605] | 84 | void matchSphericalPointDistributionsTest_multiple(); | 
|---|
| [11cc05] | 85 |  | 
|---|
|  | 86 | private: | 
|---|
|  | 87 | }; | 
|---|
|  | 88 |  | 
|---|
|  | 89 | #endif /* SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ */ | 
|---|