Changeset e7ea64 for molecuilder/src/unittests/ActOnAllUnitTest.cpp
- Timestamp:
- Apr 15, 2010, 10:54:26 AM (16 years ago)
- Children:
- 32842d8
- Parents:
- 1f591b
- File:
-
- 1 edited
-
molecuilder/src/unittests/ActOnAllUnitTest.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/unittests/ActOnAllUnitTest.cpp
r1f591b re7ea64 70 70 71 71 // scaling by value 72 VL.ActOnAll( (void (Vector::*)(const double)) &Vector::Scale, 2.);72 VL.ActOnAll( (void (Vector::*)(const double)) &Vector::Scale, factor ); 73 73 CPPUNIT_ASSERT_EQUAL( VL == Ref , false ); 74 74 75 VL.ActOnAll( (void (Vector::*)(const double)) &Vector::Scale, 0.5 ); 76 CPPUNIT_ASSERT_EQUAL( VL == Ref , true ); 77 78 // scaling by ref 79 VL.ActOnAll( (void (Vector::*)(const double * const)) &Vector::Scale, (const double * const)&factor ); 80 CPPUNIT_ASSERT_EQUAL( VL == Ref , false ); 81 82 VL.ActOnAll( (void (Vector::*)(const double * const)) &Vector::Scale, (const double * const)&inverse ); 75 VL.ActOnAll( (void (Vector::*)(const double)) &Vector::Scale, inverse ); 83 76 CPPUNIT_ASSERT_EQUAL( VL == Ref , true ); 84 77 … … 90 83 inverses[i] = 1./factors[i]; 91 84 } 92 VL.ActOnAll ( (void (Vector::*)(const double ** const)) &Vector::Scale, (const double ** const)&factors );85 VL.ActOnAll<Vector,void,const double*>(&Vector::ScaleAll, factors ); 93 86 CPPUNIT_ASSERT_EQUAL( VL == Ref , false ); 94 87 95 VL.ActOnAll ( (void (Vector::*)(const double ** const)) &Vector::Scale, (const double ** const)&inverses );88 VL.ActOnAll<Vector,void,const double*>(&Vector::ScaleAll, inverses ); 96 89 CPPUNIT_ASSERT_EQUAL( VL == Ref , true ); 97 90 Free(factors);
Note:
See TracChangeset
for help on using the changeset viewer.
