Changeset f433ec for src/Dynamics/unittests/BondVectorsUnitTest.cpp
- Timestamp:
- Apr 10, 2018, 6:43:30 AM (7 years ago)
- Branches:
- 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
- Children:
- 07d4b1
- Parents:
- 7b4e67
- git-author:
- Frederik Heber <frederik.heber@…> (07/18/17 22:24:12)
- git-committer:
- Frederik Heber <frederik.heber@…> (04/10/18 06:43:30)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Dynamics/unittests/BondVectorsUnitTest.cpp ¶
r7b4e67 rf433ec 197 197 CPPUNIT_ASSERT( fabs(weight_sum - 1.) < MYEPSILON ); 198 198 // check weight 199 CPPUNIT_ASSERT _EQUAL( weights[0], 1.);199 CPPUNIT_ASSERT( fabs(weight_sum - 1.) < 1e-10 ); 200 200 } 201 201 … … 289 289 // check number of weights 290 290 CPPUNIT_ASSERT_EQUAL( weights.size(), (size_t)5 ); 291 // check sum of weights: one linear independent, two dependent vectors = 1 + 2*0.5 292 const double weight_sum = std::accumulate(weights.begin(), weights.end(), 0.); 293 CPPUNIT_ASSERT( fabs(weight_sum - 2.) < 1e-10 ); 294 } 291 // check sum of weights 292 const double weight_sum = std::accumulate(weights.begin(), weights.end(), 0.); 293 CPPUNIT_ASSERT( fabs(weights[0] - .372244) < 1e-6 ); 294 CPPUNIT_ASSERT( fabs(weights[1] - .529694) < 1e-6 ); 295 CPPUNIT_ASSERT( fabs(weights[2] - .2) < 1e-6 ); 296 CPPUNIT_ASSERT( fabs(weights[3] - .248464) < 1e-6 ); 297 CPPUNIT_ASSERT( fabs(weights[4] - .248464) < 1e-6 ); 298 }
Note:
See TracChangeset
for help on using the changeset viewer.