|
Boost : |
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 21:39:08
on Thu Sep 15 2011, Ãbel Sinkovics <abel-AT-elte.hu> wrote:
>> BOOST_MPL_ASSERT(( mpl::equal<preorder_adj::type, mpl::vector<A,B,C,D,E,F,G,A> > ));
>
> Gordon, you can rewrite this example using metatest:
>
> ----
> #include <mpllibs/metatest/test.hpp>
>
> const mpllibs::metatest::suite_path suite("example_test_suite");
>
> typedef
> mpl::equal<preorder_adj::type, mpl::vector<A,B,C,D,E,F,G,A> >
> my_test;
>
> MPLLIBS_ADD_TEST(suite, my_test)
> ----
Why not use the function-type-trick with double parentheses employed by
BOOST_MPL_ASSERT and avoid the need to write a separate typedef?
-- 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