Boost logo

Boost :

Subject: Re: [boost] [assert][lightweight_test] Quick review of proposed changes
From: Beman Dawes (bdawes_at_[hidden])
Date: 2011-01-24 08:43:38

On Sun, Jan 23, 2011 at 12:32 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
> Beman Dawes wrote:
>> * Messages are now sent do BOOST_LIGHTWEIGHT_TEST_OSTREAM
> I'm sorry if I missed the explanation for it... what is the use case of this
> feature?

The motivating use case is the Microsoft Visual Studio IDE, which
treats cout and cerr as two separate streams. So you get all the cout
output followed by all the cerr output, when what you really want is
the equivalent of command line 2>&1

Just changing the lightweight_test.hpp output to std::cout isn't a
good solution because (1) std::cerr is really the right stream for
most uses, and (2) a change might break existing scripts that assume
std::cerr. Detecting VC++ isn't a good solution because (1) there
doesn't seem to be any way to distinguish between compiling under the
IDE versus the command line, and (2) there may be other IDE or test
frameworks that have the same problem. Thus the macro. I'll add this

// IDE's like Visual Studio perform better if output goes to std::cout or
// some other stream, so allow user to configure output stream:

> You should add your name to the copyright.

Will do.


Boost list run by bdawes at, gregod at, cpdaniel at, john at