Fixed bug in assert_container_equal function for vectors of pairs

release/4.3a0
Alex Cunningham 2011-03-17 14:46:14 +00:00
parent 3e143c1f24
commit ccf3e91b19
1 changed files with 3 additions and 2 deletions

View File

@ -147,8 +147,9 @@ bool assert_container_equal(const std::map<size_t,V2>& expected, const std::map<
* Function for comparing vector of pairs (testable, testable) * Function for comparing vector of pairs (testable, testable)
*/ */
template<class V1, class V2> template<class V1, class V2>
bool assert_container_equal(const std::vector<V1,V2>& expected, const std::vector<V1,V2>& actual, double tol = 1e-9) { bool assert_container_equal(const std::vector<std::pair<V1,V2> >& expected,
typedef typename std::vector<V1,V2> VectorPair; const std::vector<std::pair<V1,V2> >& actual, double tol = 1e-9) {
typedef typename std::vector<std::pair<V1,V2> > VectorPair;
bool match = true; bool match = true;
if (expected.size() != actual.size()) if (expected.size() != actual.size())
match = false; match = false;