Changeset ccf826 for src/unittests
- Timestamp:
- May 28, 2010, 11:41:08 AM (15 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:
- 5589858
- Parents:
- 42a101
- Location:
- src/unittests
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/unittests/PlaneUnittest.cpp
r42a101 rccf826 153 153 CPPUNIT_ASSERT(fabs(p4->distance(e1)-1) < MYEPSILON); 154 154 CPPUNIT_ASSERT_EQUAL(zeroVec,p4->getClosestPoint(e1)); 155 156 157 } 155 } 156 157 void PlaneUnittest::mirrorTest(){ 158 Vector fixture; 159 160 // some Vectors that lie on the planes 161 fixture = p1->mirrorVector(e1); 162 CPPUNIT_ASSERT_EQUAL(fixture,e1); 163 fixture = p1->mirrorVector(e2); 164 CPPUNIT_ASSERT_EQUAL(fixture,e2); 165 fixture = p1->mirrorVector(e3); 166 CPPUNIT_ASSERT_EQUAL(fixture,e3); 167 168 fixture = p2->mirrorVector(zeroVec); 169 CPPUNIT_ASSERT_EQUAL(fixture,zeroVec); 170 fixture = p2->mirrorVector(e1); 171 CPPUNIT_ASSERT_EQUAL(fixture,e1); 172 fixture = p2->mirrorVector(e2); 173 CPPUNIT_ASSERT_EQUAL(fixture,e2); 174 175 fixture = p3->mirrorVector(zeroVec); 176 CPPUNIT_ASSERT_EQUAL(fixture,zeroVec); 177 fixture = p3->mirrorVector(e1); 178 CPPUNIT_ASSERT_EQUAL(fixture,e1); 179 fixture = p3->mirrorVector(e3); 180 CPPUNIT_ASSERT_EQUAL(fixture,e3); 181 182 fixture = p4->mirrorVector(zeroVec); 183 CPPUNIT_ASSERT_EQUAL(fixture,zeroVec); 184 fixture = p4->mirrorVector(e2); 185 CPPUNIT_ASSERT_EQUAL(fixture,e2); 186 fixture = p4->mirrorVector(e3); 187 CPPUNIT_ASSERT_EQUAL(fixture,e3); 188 189 // some Vectors outside of the planes 190 { 191 Vector t = (2./3.)*(e1+e2+e3); 192 fixture = p1->mirrorVector(zeroVec); 193 CPPUNIT_ASSERT_EQUAL(fixture,t); 194 } 195 196 fixture = p2->mirrorVector(e3); 197 CPPUNIT_ASSERT_EQUAL(fixture,-1*e3); 198 fixture = p3->mirrorVector(e2); 199 CPPUNIT_ASSERT_EQUAL(fixture,-1*e2); 200 fixture = p4->mirrorVector(e1); 201 CPPUNIT_ASSERT_EQUAL(fixture,-1*e1); 202 } -
src/unittests/PlaneUnittest.hpp
r42a101 rccf826 20 20 CPPUNIT_TEST ( pointsTest ); 21 21 CPPUNIT_TEST ( operationsTest ); 22 CPPUNIT_TEST ( mirrorTest ); 22 23 CPPUNIT_TEST_SUITE_END(); 23 24 … … 30 31 void pointsTest(); 31 32 void operationsTest(); 33 void mirrorTest(); 32 34 33 35 private:
Note:
See TracChangeset
for help on using the changeset viewer.