mirror of
https://github.com/boostorg/core.git
synced 2025-07-29 12:27:42 +02:00
Output at most 8 differing container values
This commit is contained in:
@ -192,6 +192,7 @@ void test_all_eq_impl(FormattedOutputFunction& output,
|
||||
typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
|
||||
typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
|
||||
std::size_t error_count = 0;
|
||||
const std::size_t max_count = 8;
|
||||
do
|
||||
{
|
||||
while ((first_it != first_end) && (second_it != second_end) && (*first_it == *second_it))
|
||||
@ -209,6 +210,11 @@ void test_all_eq_impl(FormattedOutputFunction& output,
|
||||
{
|
||||
output << file << "(" << line << "): Container contents differ in function '" << function << "':";
|
||||
}
|
||||
else if (error_count >= max_count)
|
||||
{
|
||||
output << " ...";
|
||||
break;
|
||||
}
|
||||
output << " [" << first_index << "] '" << test_output_impl(*first_it) << "' != '" << test_output_impl(*second_it) << "'";
|
||||
++first_it;
|
||||
++second_it;
|
||||
|
Reference in New Issue
Block a user