Boost logo

Boost :

From: Ronald Garcia (rgarcia4_at_[hidden])
Date: 2001-03-16 14:05:01

>>>>> "BD" == Beman Dawes <bdawes_at_[hidden]> writes:

    BD> Interesting point. I can see why some would prefer not to see
    BD> this message. And unit test tools (for which we still need a
    BD> volunteer) would call catch_exceptions many times so shouldn't
    BD> pester the user with needless messages.

>> Could this message be factored down to the Test tools level
>> (test_main) such that no errors leads to a silent exit from
>> cpp_main?

    BD> There are cases were cpp_main users like this message. They
    BD> want the positive confirmation that the program succeeded. So
    BD> moving it to test_main wouldn't serve those folks well.

true. I had considered that but thought a user could use test_main
instead of cpp_main, without relying upon any other features. As far
as downsides to this, if I understand correctly, the usage is a little
different if you wish to #include xxx_main explicitly (#define
BOOST_INCLUDE_MAIN for test tools versus #include <cpp_main.cpp> for
execution tools). Is there something
I'm missing?

My rationale was that I like the idea of having standard messages,
but I tend to only want a "no errors detected" when I am explicitly
checking for errors, that is, testing versus execution.

    BD> Seems like we need a way to configure the message. I don't
    BD> offhand see a good way to do that at runtime without changing
    BD> the interface, which isn't desirable. Maybe a compile time
    BD> macro. BOOST_TEST_SUCCESS_MESSAGE if you want the message.
    BD> What would you think of that?

I like this solution. Even when I'm testing, there are times when I
don't want this message. My current testing system reports passes
already and the "no error detected" message actually slows down my
visual parsing of output. If this functionality is available at all
levels of the testing library, I'm all for it.


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