Sorry, I should have sent this email here:
---
Hi,
With the following test case:
#include
template
std::ostream operator<<(const std::ostream & os, const boost::array & arr)
{
os << "[ ";
for(size_t i = 0 ; i < N-1; ++i)
{
os << arr[i] << ", ";
}
os << arr[N-1] << " ]";
return os;
}
BOOST_AUTO_UNIT_TEST ( test_boost_test_array )
{
boost::array arr1[] = {
{{1,0,0}},
{{1,2,2}}
};
boost::array arr2[] = {
{{1,0,0}},
{{1,2,2}}
};
BOOST_REQUIRE_EQUAL_COLLECTIONS(arr1,arr1+2,
arr2,arr2+2);
}
I'm getting odd compile errors at this line:
res.message() << "\nMismatch in a position " << pos << ": " << *left_begin << " != " << *right_begin;
gcc.compile.c++ bjam-build/gcc/release/unit_tests/data_utils.o
external/boost/include/boost/test/utils/wrap_stringstream.hpp: In function âboost::basic_wrap_stringstream<CharT>& boost::operator<<(boost::basic_wrap_stringstream<CharT>&, const T&) [with CharT = char, T = boost::array]â:
external/boost/include/boost/test/test_tools.hpp:495: instantiated from âboost::test_tools::predicate_result boost::test_tools::tt_detail::equal_coll_impl(Left, Left, Right, Right) [with Left = boost::array*, Right = boost::array*]â
unit_tests/data_utils.cpp:62: instantiated from here
external/boost/include/boost/test/utils/wrap_stringstream.hpp:66: error: no match for âoperator<<â in â(+ targ)->boost::basic_wrap_stringstream<CharT>::stream [with CharT = char]() << tâ
What am I missing here?
Sorry for the long email!
TIA,
Sohail