X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Utils%2Fauto_unit_test.hh;h=b2e60ae5a6ee23536311c7c44092b6c5a3ae90e5;hb=42f556b7d7c8f210c5919fcb298b0dccdae568e3;hp=a12669225cf5675fa41ae527daba9030f188356d;hpb=bf6bdcb90de19ed474535d41c5519518921b717b;p=senf.git diff --git a/Utils/auto_unit_test.hh b/Utils/auto_unit_test.hh index a126692..b2e60ae 100644 --- a/Utils/auto_unit_test.hh +++ b/Utils/auto_unit_test.hh @@ -50,8 +50,44 @@ #include +/** \defgroup unittest Boost.Test extensions + + This module defines some additional extensions to Boost.Test + */ + +/** \brief Check for compile failure + + COMPILE_RAIL() is used to check, that a certain piece of code will produce a compile time + failure. + + \code + #ifdef COMPILE_CHECK + + COMPILE_FAIL(foo) + { + // fails to compile .... + int x = "foo"; + } + + COMPILE_FAIL(bar) + { ... } + + #endif + \endcode + + This check is performed by the extended unit-test builder in \c senfscons. + + \ingroup unittest + */ #define COMPILE_FAIL(n) void n() +/** \brief Show exception information + + \ref SENF_CHECK_NO_THROW() is an extension to \c BOOST_CHECK_NO_THROW() which will write out the + unabridged exception information when an exception is thrown in addition to signaling an error. + + \ingroup unittest + */ #define SENF_CHECK_NO_THROW(expr) \ BOOST_CHECK_NO_THROW( \ try { (void) expr ; } \