|
Boost : |
Subject: Re: [boost] Template metaprogramming libraries
From: Ábel Sinkovics (abel_at_[hidden])
Date: 2011-09-10 07:05:15
Hi Vicente,
The sub-libraries have the following dependencies:
- metatest doesn't really depend on any of the libraries (one of its
examples depends on metamonad, but it can be moved to metamonad)
- metamonad depends on metatest
- metaparse depends on metatest and metamonad
- safe_printf depends on metaparse (it has no test cases yet)
Test cases should be nullary metafunctions returning boolean values
indicating success/failure of the test case - the condition of the
static assertion - instead of using static assertions themselves.
Metatest collects this information and displays it in a final summary. A
static assertion failure in metatest is similar to a core dump while
running runtime tests, the testing library can't catch it.
When metafunctions verify their arguments, they can throw compile-time
exceptions (implemented in metamonad) instead of using static
assertions. Those exceptions can be caught and handled by the testing
framework (and added to the test report).
Metatest contains a solution for pretty-printing template expressions,
thus the reason of failures can be displayed in a standard format
independent of the compiler/platform.
You can find a number of MPL test cases ported to metatest in the
metatest examples (libs/metatest/example/boost_mpl_unit_test in the
source tree). You can take a look at them and generate example reports
(plain-text, HTML/JavaScript, Boost.Test).
Regards,
Abel
Am Freitag, den 09.09.2011, 21:44 +0200 schrieb Vicente J. Botet
Escriba:
> Le 07/09/11 22:29, Ãbel Sinkovics a écrit :
> Hi,
>
> I find in general all your libraries quite interesting.
>
> What are the dependencies between these sub-libraries?
> A meta program test case fails if you call static assert on some static
> condition, isn't it. If the user uses Boost.Test or any other kind of
> runtime check then the compilation doesn't fails. I'm wondering what
> metatest adds to Boost.Test then?
> I hope to comeback with more comments of your libraries soon.
>
> Good work,
> Vicente
>
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk