Boost C++ Libraries: Ticket #11418: tests which do nothing should not return 0 as return value https://svn.boost.org/trac10/ticket/11418 <p> Given: </p> <pre class="wiki">#define BOOST_TEST_MODULE This is my test #define NDEBUG #include &lt;boost/test/unit_test.hpp&gt; BOOST_AUTO_TEST_CASE( only_and_useless_testcase_in_file ) { BOOST_ASSERT(1 == 0); } </pre><p> running this test does nothing because BOOST_ASSERT evaluates to nothing. Which is ok, but the overall test should not return 0 in this case. We had several tests in our test suite that were effectively disabled by the NDEBUG but nobody detected it, because the the tests returned everything is ok (and nobody looked at the output, because everything was fine) </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11418 Trac 1.4.3 Raffi Enficiaud Fri, 03 Jul 2015 11:25:18 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/11418#comment:1 https://svn.boost.org/trac10/ticket/11418#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> An empty test tree is considered as a failure. Inside a test case, there is no such constraint, and this is by design: your bug can be considered as a feature. </p> Ticket