Thank you Gennadiy, now it works like it should :)
Regards

2011/11/13 Gennadiy Rozental <rogeeff@gmail.com>
Jaros³aw Bober <jaroslaw.bober <at> gmail.com> writes:

> I have a question. Is there possibility that in results
> i'll see only those members that failed assertion?
> like [expected.b: 1 != received.b: 2]
> without having to manually search for failed member?Regards

What you can do is to implement custom comparator which returns
predicate_result. Something like this:

bool compare(MyClass const& expected, MyClass const& received)
{
   if(expected.a != received.a) {
        predicate_result res( false );
        res.message() << "Difference in field a: " << expected.a << ", "
received.a;
   }

   if(expected.b != received.b) {
        predicate_result res( false );
        res.message() << "Difference in field b: " << expected.b << ", "
received.b;
   }

   return true;
}

Gennadiy

_______________________________________________
Boost-Testing mailing list
Boost-Testing@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/boost-testing