| 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 |  | 
|---|
| 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 | 
|---|
| 25 | { | 
|---|
| 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 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<8>(); | 
|---|
| 35 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<9>(); | 
|---|
| 36 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<10>(); | 
|---|
| 37 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<11>(); | 
|---|
| 38 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<12>(); | 
|---|
| 39 | template <> void SphericalPointDistributionTest_assistant::getConnectionTest<14>(); | 
|---|
| 40 |  | 
|---|
| 41 | #include "SphericalPointDistributionUnitTest_assistant.hpp" | 
|---|
| 42 |  | 
|---|
| 43 | class SphericalPointDistributionTest : | 
|---|
| 44 | public CppUnit::TestFixture, | 
|---|
| 45 | public SphericalPointDistributionTest_assistant | 
|---|
| 46 | { | 
|---|
| 47 |  | 
|---|
| 48 | private: | 
|---|
| 49 | CPPUNIT_TEST_SUITE( SphericalPointDistributionTest) ; | 
|---|
| 50 | CPPUNIT_TEST( calculateCenterOfMinimumDistanceTest ); | 
|---|
| 51 | CPPUNIT_TEST ( areEqualToWithinBoundsTest ); | 
|---|
| 52 | CPPUNIT_TEST ( joinPointsTest ); | 
|---|
| 53 | CPPUNIT_TEST ( getConnectionTest<0> ); | 
|---|
| 54 | CPPUNIT_TEST ( getConnectionTest<1> ); | 
|---|
| 55 | CPPUNIT_TEST ( getConnectionTest<2> ); | 
|---|
| 56 | CPPUNIT_TEST ( getConnectionTest<3> ); | 
|---|
| 57 | CPPUNIT_TEST ( getConnectionTest<4> ); | 
|---|
| 58 | CPPUNIT_TEST ( getConnectionTest<5> ); | 
|---|
| 59 | CPPUNIT_TEST ( getConnectionTest<6> ); | 
|---|
| 60 | CPPUNIT_TEST ( getConnectionTest<7> ); | 
|---|
| 61 | CPPUNIT_TEST ( getConnectionTest<8> ); | 
|---|
| 62 | CPPUNIT_TEST ( getConnectionTest<9> ); | 
|---|
| 63 | CPPUNIT_TEST ( getConnectionTest<10> ); | 
|---|
| 64 | CPPUNIT_TEST ( getConnectionTest<11> ); | 
|---|
| 65 | CPPUNIT_TEST ( getConnectionTest<12> ); | 
|---|
| 66 | CPPUNIT_TEST ( getConnectionTest<14> ); | 
|---|
| 67 | CPPUNIT_TEST ( getRemainingPointsTest_2 ); | 
|---|
| 68 | CPPUNIT_TEST ( getRemainingPointsTest_3 ); | 
|---|
| 69 | CPPUNIT_TEST ( getRemainingPointsTest_4 ); | 
|---|
| 70 | CPPUNIT_TEST ( getRemainingPointsTest_5 ); | 
|---|
| 71 | CPPUNIT_TEST ( getRemainingPointsTest_6 ); | 
|---|
| 72 | CPPUNIT_TEST ( getRemainingPointsTest_7 ); | 
|---|
| 73 | CPPUNIT_TEST ( getRemainingPointsTest_8 ); | 
|---|
| 74 | CPPUNIT_TEST ( getRemainingPointsTest_multiple ); | 
|---|
| 75 | CPPUNIT_TEST_SUITE_END(); | 
|---|
| 76 |  | 
|---|
| 77 | public: | 
|---|
| 78 | void setUp(); | 
|---|
| 79 | void tearDown(); | 
|---|
| 80 | void calculateCenterOfMinimumDistanceTest(); | 
|---|
| 81 | void areEqualToWithinBoundsTest(); | 
|---|
| 82 | void joinPointsTest(); | 
|---|
| 83 | void getRemainingPointsTest_2(); | 
|---|
| 84 | void getRemainingPointsTest_3(); | 
|---|
| 85 | void getRemainingPointsTest_4(); | 
|---|
| 86 | void getRemainingPointsTest_5(); | 
|---|
| 87 | void getRemainingPointsTest_6(); | 
|---|
| 88 | void getRemainingPointsTest_7(); | 
|---|
| 89 | void getRemainingPointsTest_8(); | 
|---|
| 90 | void getRemainingPointsTest_multiple(); | 
|---|
| 91 |  | 
|---|
| 92 | private: | 
|---|
| 93 | }; | 
|---|
| 94 |  | 
|---|
| 95 | #endif /* SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ */ | 
|---|