Re: [boost] Review: Boost Test Library
by Beman Dawes other posts by this author
Feb 28 2001 8:10PM messages near this date
Re: [boost] Review: Boost Test Library
|
Re: [boost] Review: Boost Test Library
At 01:04 PM 2/28/2001 -0600, Ed Brey wrote:
> From: Beman Dawes <bdawes@[...]..>
> > Agreed. I've cut the macro names down to:
> >
> > BOOST_TEST(exp)
> > BOOST_TEST_CRITICAL(exp)
> > BOOST_TEST_ERROR(msg)
> > BOOST_TEST_ERROR_CRITICAL(msg)
> >
> > BOOST_TEST seems to me to be as meaningful as BOOST_TEST_VERIFY, yet is
a
> > bit shorter, which is important for this most heavily used macro.
> >
> > BOOST_TEST_ERROR seemed to relate better to the error reported than
> > BOOST_TEST_FAILURE.
> >
> > If anyone has a serious objection to these names, please let me know
> before
> > the release.
>
> If I disengage the previous knowledge section of my brain (to the extent
> possible), the new names seem a bit confusing to me. The difference
> between
> BOOST_TEST_CRITICAL and BOOST_TEST_ERROR_CRITICAL doesn't seem
intuitively
> obvious. I think the crux of the problem is that the last two macros
don't
> test anything; they just report. So perhaps BOOST_REPORT_ERROR and
> BOOST_REPORT_CRITICAL_ERROR or, for more brevity, just BOOST_ERROR and
> BOOST_CRITICAL_ERROR might be good. The latter choice feels in harmony
> with the #error preprocessor directive, which is a good thing.
>
> In any case, I would recommend using CRITICAL_ERROR rather than
> ERROR_CRITICAL, as having the adjective first sounds more natural in
> English.
The point of having _TEST as the second word was to make it clear what
Boost library they were associated with. But I go back and forth on the
names. How about these:
BOOST_TEST(exp)
BOOST_CRITICAL_TEST(exp)
BOOST_ERROR(msg)
BOOST_CRITICAL_ERROR(msg)
They seem clear enough to me, but I'm so close I can't see the forest for
the trees. Comments?
--Beman
Thread:
Jens Maurer
Ed Brey
Beman Dawes
Jens Maurer
Beman Dawes
Jens Maurer
Jens Maurer
David Abrahams
David Abrahams
Mark Rodgers
Kevlin Henney
Kevlin Henney
Ronald Garcia
Mark Rodgers
Ed Brey
David Abrahams
David Abrahams
David Abrahams
Beman Dawes
Ed Brey
Jens Maurer
Beman Dawes
Ed Brey
|