Changeset 1239 for trunk/test/Suite.h


Ignore:
Timestamp:
Mar 16, 2008, 6:09:56 AM (14 years ago)
Author:
Peter
Message:

working on #223

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/Suite.h

    r1234 r1239  
    5959    bool equal(double a, double b, unsigned int N=1);
    6060
    61     double last_error_bound(void) const;
     61    template<typename Iterator1, typename Iterator2>
     62    bool equal_range(Iterator1 first1, Iterator1 last1, Iterator2 first2,
     63                     unsigned int N=1);
    6264
    6365    /**
     
    8587    bool ok_;
    8688    std::ofstream* dev_null_;
    87     double last_error_bound_;
    8889
    8990  };
     91
     92  template<typename Iterator1, typename Iterator2>
     93  bool Suite::equal_range(Iterator1 first1, Iterator1 last1, Iterator2 first2,
     94                          unsigned int N)
     95  {
     96    while (first1!=last1){
     97      if (!this->equal(*first1, *first2, N) )  {
     98        return false;
     99      }
     100      ++first1;
     101      ++first2;
     102    }
     103    return true;
     104  }
    90105
    91106}}}
Note: See TracChangeset for help on using the changeset viewer.