Boost logo

Boost Users :

Subject: Re: [Boost-users] BOOST_CHECK_EQUAL_COLLECTIONS fails to compile when comparing vector<wstring>
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2009-04-14 01:30:53


Mauricio Gomes <mgpensar <at> gmail.com> writes:

> I cannot compile BOOST_CHECK_EQUAL_COLLECTIONS when using wstring. See

...

> However this seems somewhat clumsy to me.
> I do not like the idea of doing a cast like
> this that obviously can fail if the wstring
> has a wide char that cannot be mapped to char properly.
> And it seems inappropriate to require the user to define
> such a thing.

Unit test framework test tools require an output operation for the values
being compared. That's why you are faced with this issue. Boost.Test is
based on ostreams and there is no operator<< defined for wstring. You
should be able to shutdown output completely for wstring using
BOOST_TEST_DONT_PRINT_LOG_VALUE macro.

Unfortunately complete support for wide string or even more generally for
unicode is not simple project and require significant time investment. I
am not sure at this point when I'll get to it, even though it's on my
todo list.

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net