- Timestamp:
- Aug 9, 2013, 2:20:37 PM (12 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- e2037e
- Parents:
- 1413f4
- git-author:
- Frederik Heber <heber@…> (07/08/13 07:20:55)
- git-committer:
- Frederik Heber <heber@…> (08/09/13 14:20:37)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
src/Potentials/Specifics/unittests/ThreeBodyPotential_AngleUnitTest.cpp
r1413f4 r484e2a 23 23 24 24 /* 25 * PairPotential_AngleUnitTest.cpp25 * ThreeBodyPotential_AngleUnitTest.cpp 26 26 * 27 27 * Created on: Oct 16, 2012 … … 40 40 #include <cppunit/ui/text/TestRunner.h> 41 41 42 #include " PairPotential_AngleUnitTest.hpp"42 #include "ThreeBodyPotential_AngleUnitTest.hpp" 43 43 44 44 #include <boost/assign.hpp> … … 47 47 48 48 #include "FunctionApproximation/FunctionArgument.hpp" 49 #include "Potentials/Specifics/ PairPotential_Angle.hpp"49 #include "Potentials/Specifics/ThreeBodyPotential_Angle.hpp" 50 50 #include "Potentials/helpers.hpp" 51 51 … … 59 59 60 60 // Registers the fixture into the 'registry' 61 CPPUNIT_TEST_SUITE_REGISTRATION( PairPotential_AngleTest );61 CPPUNIT_TEST_SUITE_REGISTRATION( ThreeBodyPotential_AngleTest ); 62 62 63 63 const double spring_constant = .5; 64 64 65 void PairPotential_AngleTest::setUp()65 void ThreeBodyPotential_AngleTest::setUp() 66 66 { 67 67 // failing asserts should be thrown … … 97 97 98 98 99 void PairPotential_AngleTest::tearDown()99 void ThreeBodyPotential_AngleTest::tearDown() 100 100 { 101 101 } … … 103 103 /** UnitTest for operator() 104 104 */ 105 void PairPotential_AngleTest::operatorTest()105 void ThreeBodyPotential_AngleTest::operatorTest() 106 106 { 107 PairPotential_Angle::ParticleTypes_t types =108 boost::assign::list_of< PairPotential_Angle::ParticleType_t>107 ThreeBodyPotential_Angle::ParticleTypes_t types = 108 boost::assign::list_of<ThreeBodyPotential_Angle::ParticleType_t> 109 109 (0)(1)(1) 110 110 ; 111 PairPotential_Angle angle(types, spring_constant,0.);111 ThreeBodyPotential_Angle angle(types, spring_constant,0.); 112 112 for (size_t index = 0; index < input.size(); ++index) { 113 const PairPotential_Angle::results_t result =113 const ThreeBodyPotential_Angle::results_t result = 114 114 angle( input[index] ); 115 115 CPPUNIT_ASSERT( … … 124 124 /** UnitTest for derivative() 125 125 */ 126 void PairPotential_AngleTest::derivativeTest()126 void ThreeBodyPotential_AngleTest::derivativeTest() 127 127 { 128 PairPotential_Angle::ParticleTypes_t types =129 boost::assign::list_of< PairPotential_Angle::ParticleType_t>128 ThreeBodyPotential_Angle::ParticleTypes_t types = 129 boost::assign::list_of<ThreeBodyPotential_Angle::ParticleType_t> 130 130 (0)(1)(1) 131 131 ; 132 PairPotential_Angle angle(types, spring_constant,0.);132 ThreeBodyPotential_Angle angle(types, spring_constant,0.); 133 133 CPPUNIT_ASSERT( 134 134 Helpers::isEqual( … … 145 145 /** UnitTest for parameter_derivative() 146 146 */ 147 void PairPotential_AngleTest::parameter_derivativeTest()147 void ThreeBodyPotential_AngleTest::parameter_derivativeTest() 148 148 { 149 PairPotential_Angle::ParticleTypes_t types =150 boost::assign::list_of< PairPotential_Angle::ParticleType_t>149 ThreeBodyPotential_Angle::ParticleTypes_t types = 150 boost::assign::list_of<ThreeBodyPotential_Angle::ParticleType_t> 151 151 (0)(1)(1) 152 152 ; 153 PairPotential_Angle angle(types, spring_constant,0.);153 ThreeBodyPotential_Angle angle(types, spring_constant,0.); 154 154 CPPUNIT_ASSERT( 155 155 Helpers::isEqual(
Note:
See TracChangeset
for help on using the changeset viewer.