Subject: Re: [boost] Is there interest in unit testing both passing and failing BOOST_MPL_ASSERTs?
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-09-15 12:12:11
on Tue Sep 13 2011, Ãbel Sinkovics <abel-AT-elte.hu> wrote:
> Hi Dave,
>> If you're just checking MPL assertions, then presumably there's a
>> predicate that can be evaluated without throwing. Why not just feed
>> those predicates' results to regular runtime assertions?
> In addition to feeding those predicates to runtime assertions a type
> pretty-printing utility can be used to provide more detail on why the
> predicate failed. Relying on a pretty-printer rather than the compiler
> error messages makes the output standard across platforms/compilers and
> more readable in many cases.
Okay, point taken. But that's *not* BOOST_MPL_ASSERT. IMO you need a
different macro for that purpose.
-- Dave Abrahams BoostPro Computing http://www.boostpro.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk