source: src/Fragmentation/Exporters/unittests/SphericalPointDistributionUnitTest.hpp@ e6ca85

Last change on this file since e6ca85 was e6ca85, checked in by Frederik Heber <heber@…>, 11 years ago

recurseMatching() now takes connections into account.

  • matchSphericalPointDistribution() replaced by getRemainingPoints() as that describes what it does. match...() sounds symmetrical which the function is no longer as connection is associated with former _newpolygon.
  • SphericalPointDistribution now has internal points and adjacency, initialized by initSelf().
  • findBestMatching() and getRemainingPoints() are no longer static functions.
  • all unit tests are working again, including the .._multiple() that tests for joint points due to bond degree greater than 1.
  • the huge case switch in SaturatedFragment::saturateAtom() now resides in initSelf().
  • Property mode set to 100644
File size: 2.8 KB
Line 
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 */
24struct SphericalPointDistributionTest_assistant
25{
26public:
27 template <int N>
28 void getConnectionTest();
29};
30
31template <> void SphericalPointDistributionTest_assistant::getConnectionTest<0>();
32template <> void SphericalPointDistributionTest_assistant::getConnectionTest<1>();
33template <> void SphericalPointDistributionTest_assistant::getConnectionTest<2>();
34
35#include "SphericalPointDistributionUnitTest_assistant.hpp"
36
37class SphericalPointDistributionTest :
38 public CppUnit::TestFixture,
39 public SphericalPointDistributionTest_assistant
40{
41
42private:
43 CPPUNIT_TEST_SUITE( SphericalPointDistributionTest) ;
44 CPPUNIT_TEST( calculateCenterOfMinimumDistanceTest );
45 CPPUNIT_TEST ( areEqualToWithinBoundsTest );
46 CPPUNIT_TEST ( joinPointsTest );
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> );
61 CPPUNIT_TEST ( getRemainingPointsTest_2 );
62 CPPUNIT_TEST ( getRemainingPointsTest_3 );
63 CPPUNIT_TEST ( getRemainingPointsTest_4 );
64 CPPUNIT_TEST ( getRemainingPointsTest_5 );
65 CPPUNIT_TEST ( getRemainingPointsTest_6 );
66 CPPUNIT_TEST ( getRemainingPointsTest_7 );
67 CPPUNIT_TEST ( getRemainingPointsTest_8 );
68 CPPUNIT_TEST ( getRemainingPointsTest_multiple );
69 CPPUNIT_TEST_SUITE_END();
70
71public:
72 void setUp();
73 void tearDown();
74 void calculateCenterOfMinimumDistanceTest();
75 void areEqualToWithinBoundsTest();
76 void joinPointsTest();
77 void getRemainingPointsTest_2();
78 void getRemainingPointsTest_3();
79 void getRemainingPointsTest_4();
80 void getRemainingPointsTest_5();
81 void getRemainingPointsTest_6();
82 void getRemainingPointsTest_7();
83 void getRemainingPointsTest_8();
84 void getRemainingPointsTest_multiple();
85
86private:
87};
88
89#endif /* SPHERICALPOINTDISTRIBUTIONUNITTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.