Changeset 1658 for trunk/test/Suite.h
 Timestamp:
 Dec 17, 2008, 4:02:00 PM (14 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/test/Suite.h
r1569 r1658 61 61 62 62 /** 63 \return true if \a a  \a b <= \a margin 64 */ 65 bool equal_fix(double a, double b, double margin=0); 66 67 /** 63 68 \return true if \f$ ab <= N * sqrt(\epsilon) * min(a,b) \f$ 64 69 where \f$ \epsilon \f$ is std::numeric_limits<double>().epsilon() … … 66 71 bool equal_sqrt(double a, double b, unsigned long int N=1); 67 72 73 /** 74 apply equal on ranges [first1, last1) and [first2, ...) 75 */ 68 76 template<typename Iterator1, typename Iterator2> 69 77 bool equal_range(Iterator1 first1, Iterator1 last1, Iterator2 first2, 70 78 unsigned int N=1); 79 80 /** 81 apply equal_fix on ranges [first1, last1) and [first2, ...) 82 */ 83 template<typename Iterator1, typename Iterator2> 84 bool equal_range_fix(Iterator1 first1, Iterator1 last1, Iterator2 first2, 85 double margin); 71 86 72 87 /** … … 143 158 144 159 160 template<typename Iterator1, typename Iterator2> 161 bool Suite::equal_range_fix(Iterator1 first1, Iterator1 last1, 162 Iterator2 first2, double margin) 163 { 164 while (first1!=last1){ 165 if (!this>equal_fix(*first1, *first2, margin) ) { 166 return false; 167 } 168 ++first1; 169 ++first2; 170 } 171 return true; 172 } 173 174 145 175 template<class T> 146 176 bool Suite::test_stream(const T& t) const
Note: See TracChangeset
for help on using the changeset viewer.