source: src/Dynamics/unittests/BondVectorsUnitTest.hpp@ c1c6cb

AutomationFragmentation_failures Candidate_v1.6.1 ChemicalSpaceEvaluator Exclude_Hydrogens_annealWithBondGraph ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_contraction-expansion Gui_displays_atomic_force_velocity PythonUI_with_named_parameters StoppableMakroAction TremoloParser_IncreasedPrecision
Last change on this file since c1c6cb was c1c6cb, checked in by Frederik Heber <frederik.heber@…>, 7 years ago

Added unit tests for BondVectors.

  • Added tests on up-to-date internal map and calculating weights.
  • Property mode set to 100644
File size: 1.4 KB
Line 
1/*
2 * BondVectorsUnitTest.hpp
3 *
4 * Created on: Jun 29, 2017
5 * Author: heber
6 */
7
8#ifndef BONDVECTORSUNITTEST_HPP_
9#define BONDVECTORSUNITTEST_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#include <vector>
20
21#include "Bond/bond.hpp"
22
23class atom;
24class BondVectors;
25class element;
26
27/********************************************** Test classes **************************************/
28
29class BondVectorsTest : public CppUnit::TestFixture
30{
31 CPPUNIT_TEST_SUITE( BondVectorsTest) ;
32 CPPUNIT_TEST ( current_mappedTest );
33 CPPUNIT_TEST ( weights_singlebondTest );
34 CPPUNIT_TEST ( weights_linearchainTest );
35 CPPUNIT_TEST ( weights_rightangleTest );
36 CPPUNIT_TEST ( weights_triangleTest );
37 CPPUNIT_TEST_SUITE_END();
38
39public:
40 void setUp();
41 void tearDown();
42 void current_mappedTest();
43 void weights_singlebondTest();
44 void weights_linearchainTest();
45 void weights_rightangleTest();
46 void weights_triangleTest();
47
48private:
49 enum atomPositions
50 {
51 left,
52 center,
53 right,
54 top,
55 topright,
56 bottom,
57 bottomright
58 };
59
60 BondVectors *bv;
61 std::vector<atom *> atoms;
62 std::vector<atom *> atomvector;
63 std::vector<bond::ptr> bondvector;
64 atom * _atom;
65 bond * _bond;
66 const element * carbon;
67};
68
69#endif /* BONDVECTORSUNITTEST_HPP_ */
Note: See TracBrowser for help on using the repository browser.