$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] Boost.Test updates in trunk: need for (mini) review?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2012-10-20 13:07:04
AMDG
On 10/19/2012 08:03 PM, Gennadiy Rozenal wrote:
> Hi,
>
> It's been a long while since I merged any changes into boost release and by
> now there are whole bunch of new features there. Some are small, but some
> others are big ones such that they can change the way people use the library.
> I'd like to list them here (excluding bug fixes and removal of deprecated
> interfaces) and ask what should we do with these. Specifically let me know
> if you think these require some kind of (mini) review from community, but any
> other comments are welcome as well.
>
> So here we go:
>
> I. New testing tool BOOST_CHECKA
>
> This tool is based on excellent idea from Kevlin Henney. I chose the name
> CHECKA for this tool due to the lack of better name, but I am open to
> suggestions.
BOOST_CHECK_EXPR? Ideally I'd like this
to be called BOOST_CHECK, but I don't
think that can be made perfectly backwards
compatible.
> This testing tool capable of replacing whole bunch of existing
> other tools like BOOST_CHECK_EQUAL, BOOST_CHECK_GT etc. Usage is the most
> natural you can wish for:
>
> BOOST_CHECKA( var1 - var2 >= 12 );
>
> And the output will include as much information as we can get:
>
> error: in "foo": check var1 - var2 >= 12 failed [23-15<12]
>
I like it, however, the limitations need to
be clearly documented.
> II. New "data driven test case" subsystem
>
> <snip>
> Here are couple examples:
>
> int samples1[] = {1,2,3};
> BOOST_DATA_TEST_CASE( t1, samples1, sample )
> {
> BOOST_CHECKA( foo(sample) > 0 );
> }
>
This is great. I've often needed this functionality
and I've always ended up writing manual loops.
In Christ,
Steven Watanabe