|
Boost : |
From: Benoit Sigoure (tsuna_at_[hidden])
Date: 2008-01-11 16:35:18
On Jan 11, 2008, at 7:50 PM, Gennadiy Rozental wrote:
> Benoit Sigoure <tsuna <at> lrde.epita.fr> writes:
>> Would it be possible for you to give me the smallest dumb code that
>> exercises the most basic feature of Boost.Test + compilation and
>> linkage against Boost.Test?
>
> Test for single header variant; no need to link with the library:
>
> #define BOOST_TEST_MODULE boost.m4
> #include <boost/test/included/unit_test.hpp>
>
> BOOST_AUTO_TEST_CASE( case )
> {
> BOOST_ERROR( "expected" );
> }
>
> ---------------------
>
> Standalone library variants:
>
> #define BOOST_TEST_MODULE boost.m4
> #include <boost/test/unit_test.hpp>
>
> BOOST_AUTO_TEST_CASE( case )
> {
> BOOST_ERROR( "expected" );
> }
>
> This should work both for static and shared library variants. In
> later case
> you need to add BOOST_TEST_DYN_LINK to the compiler options and
> corresponding
> link options to enforce linking with shared library.
>
> Some specific features of Boost.Test (like floating point
> comparisons) require
> additional headers. We can come up with corresponding tests as well.
Thanks for your code. It grieves me that Boost.Test is the *only*
library for which I have to write "special cases" only because it's
not "well-behaved".
-- Benoit Sigoure aka Tsuna EPITA Research and Development Laboratory
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk