Changeset c739b3 for src/Fragmentation/Summation/SetValues/unittests/SamplingGridPropertiesUnitTest.cpp
- Timestamp:
- Jun 8, 2016, 10:45:27 PM (9 years ago)
- Children:
- 6369bc
- Parents:
- e34888
- git-author:
- Frederik Heber <heber@…> (06/06/16 14:28:05)
- git-committer:
- Frederik Heber <heber@…> (06/08/16 22:45:27)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Summation/SetValues/unittests/SamplingGridPropertiesUnitTest.cpp
re34888 rc739b3 75 75 } 76 76 77 /** UnitTest for is Compatible()77 /** UnitTest for isEquivalent() 78 78 */ 79 void SamplingGridPropertiesTest::is Compatible_Test()79 void SamplingGridPropertiesTest::isEquivalent_Test() 80 80 { 81 81 const double begin[3] = { 0., 0., 0. }; … … 91 91 92 92 // only checks for same level 93 CPPUNIT_ASSERT( props->isEquivalent(*props) ); 94 CPPUNIT_ASSERT( props->isEquivalent(sameprops) ); 95 CPPUNIT_ASSERT( sameprops.isEquivalent(*props) ); 96 CPPUNIT_ASSERT( !props->isEquivalent(otherprops) ); 97 CPPUNIT_ASSERT( !otherprops.isEquivalent(*props) ); 98 CPPUNIT_ASSERT( !props->isEquivalent(anotherprops) ); 99 CPPUNIT_ASSERT( !anotherprops.isEquivalent(*props) ); 100 CPPUNIT_ASSERT( !props->isEquivalent(moreotherprops) ); 101 CPPUNIT_ASSERT( !moreotherprops.isEquivalent(*props) ); 102 } 103 104 /** UnitTest for isCompatible() 105 */ 106 void SamplingGridPropertiesTest::isCompatible_Test() 107 { 108 const double begin[3] = { 0., 0., 0. }; 109 const double otherbegin[3] = { .5, .5, .5 }; 110 const double end[3] = { 1., 1., 1. }; 111 const double otherend[3] = { 2., 2., 2. }; 112 113 // create other props 114 SamplingGridProperties sameprops(begin, end, 2); // same 115 SamplingGridProperties secondhalf(otherbegin, end, 2); // second half 116 SamplingGridProperties goingbeyond(begin, otherend, 2); // going beyond 117 SamplingGridProperties finerlevel(begin, end, 4); // same but different level 118 119 // only checks for same level 93 120 CPPUNIT_ASSERT( props->isCompatible(*props) ); 94 121 CPPUNIT_ASSERT( props->isCompatible(sameprops) ); 95 122 CPPUNIT_ASSERT( sameprops.isCompatible(*props) ); 96 CPPUNIT_ASSERT( props->isCompatible( otherprops) );97 CPPUNIT_ASSERT( otherprops.isCompatible(*props) );98 CPPUNIT_ASSERT( props->isCompatible(anotherprops) );99 CPPUNIT_ASSERT( anotherprops.isCompatible(*props) );100 CPPUNIT_ASSERT( !props->isCompatible(moreotherprops) );101 CPPUNIT_ASSERT( ! moreotherprops.isCompatible(*props) );123 CPPUNIT_ASSERT( props->isCompatible(secondhalf) ); 124 CPPUNIT_ASSERT( !secondhalf.isCompatible(*props) ); 125 CPPUNIT_ASSERT( !props->isCompatible(goingbeyond) ); 126 CPPUNIT_ASSERT( goingbeyond.isCompatible(*props) ); 127 CPPUNIT_ASSERT( props->isCompatible(finerlevel) ); 128 CPPUNIT_ASSERT( !finerlevel.isCompatible(*props) ); 102 129 } 103 130
Note:
See TracChangeset
for help on using the changeset viewer.
