2007-05-12 12:34:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2013-07-28 22:10:37 +00:00
|
|
|
// (C) Copyright Ion Gaztanaga 2006-2013
|
2007-05-12 12:34:55 +00:00
|
|
|
//
|
|
|
|
|
// Distributed under the Boost Software License, Version 1.0.
|
|
|
|
|
// (See accompanying file LICENSE_1_0.txt or copy at
|
|
|
|
|
// http://www.boost.org/LICENSE_1_0.txt)
|
|
|
|
|
//
|
|
|
|
|
// See http://www.boost.org/libs/intrusive for documentation.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#ifndef BOOST_INTRUSIVE_TEST_TEST_MACROS_HPP
|
|
|
|
|
#define BOOST_INTRUSIVE_TEST_TEST_MACROS_HPP
|
|
|
|
|
|
2014-02-08 18:27:24 +01:00
|
|
|
namespace boost{
|
|
|
|
|
namespace intrusive{
|
|
|
|
|
|
|
|
|
|
template<class It1, class It2>
|
|
|
|
|
bool test_equal(It1 f1, It1 l1, It2 f2)
|
|
|
|
|
{
|
|
|
|
|
while(f1 != l1){
|
|
|
|
|
if(*f1 != *f2){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
++f1;
|
|
|
|
|
++f2;
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
2007-05-12 12:34:55 +00:00
|
|
|
#define TEST_INTRUSIVE_SEQUENCE( INTVALUES, ITERATOR )\
|
|
|
|
|
{ \
|
2014-02-08 18:27:24 +01:00
|
|
|
BOOST_TEST (boost::intrusive::test_equal(&INTVALUES[0], &INTVALUES[0] + sizeof(INTVALUES)/sizeof(INTVALUES[0]), ITERATOR) ); \
|
2007-05-12 12:34:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#define TEST_INTRUSIVE_SEQUENCE_EXPECTED( EXPECTEDVECTOR, ITERATOR )\
|
|
|
|
|
{ \
|
2014-02-08 18:27:24 +01:00
|
|
|
BOOST_TEST (boost::intrusive::test_equal(EXPECTEDVECTOR.begin(), EXPECTEDVECTOR.end(), ITERATOR) ); \
|
2007-05-12 12:34:55 +00:00
|
|
|
}
|
|
|
|
|
|
2014-02-08 18:27:24 +01:00
|
|
|
} //namespace boost{
|
|
|
|
|
} //namespace intrusive{
|
|
|
|
|
|
2007-05-12 12:34:55 +00:00
|
|
|
#endif
|