Changeset 90e540 for src/Dynamics/unittests
- Timestamp:
- Jul 20, 2017, 9:38:39 AM (8 years ago)
- Branches:
- ForceAnnealing_with_BondGraph_continued
- Children:
- ccbdf4
- Parents:
- 6d7c73
- git-author:
- Frederik Heber <frederik.heber@…> (07/18/17 22:24:12)
- git-committer:
- Frederik Heber <frederik.heber@…> (07/20/17 09:38:39)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Dynamics/unittests/BondVectorsUnitTest.cpp
r6d7c73 r90e540 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.